🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #952

sizeof ((rehash *) 0)->again

#952
From: Norman Diamond
Date: Thu, 16 Nov 1989 13:38
12 lines
1096 bytes
According to section 3.2.2.3, page 38, an integral constant expression
with the value 0, or such an expression cast to type void *, is a null
pointer constant.  SUCH AN EXPRESSION CAST TO TYPE rehash * IS NOT CITED
IN THIS MANNER.  Section 3.3.4 says that the result has the named type,
i.e. rehash *.  Therefore the semantics of -> select a member of the
pointed-to type, and sizeof takes its size.

-- 
Norman Diamond, Sony Corp. (diamond%ws.sony.junet@uunet.uu.net seems to work)
  Should the preceding opinions be caught or     |  James Bond asked his
  killed, the sender will disavow all knowledge  |  ATT rep for a source
  of their activities or whereabouts.            |  licence to "kill".
Technical Details
Message-ID: <11138@riks.csl.sony.co.jp>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!kddlab!ccut!titcca!sragwa!wsgw!socslgw!diamond

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!kddlab!ccut!titcca!sragwa!wsgw!socslgw!diamond
From: diamond@csl.sony.co.jp (Norman Diamond)
Newsgroups: comp.std.c
Subject: sizeof ((rehash *) 0)->again
Message-ID: <11138@riks.csl.sony.co.jp>
Date: 16 Nov 89 13:38:53 GMT
Reply-To: diamond@ws.sony.junet (Norman Diamond)
Organization: Sony Computer Science Laboratory Inc., Tokyo, Japan
Lines: 12