Path: utzoo!attcan!uunet!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: sizeof ((rehash *) 0)->again Message-ID: <11628@smoke.BRL.MIL> Date: 17 Nov 89 16:11:03 GMT References: <11138@riks.csl.sony.co.jp> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 11 In article <11138@riks.csl.sony.co.jp> diamond@ws.sony.junet (Norman Diamond) writes: >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. This argument was already made and I disagreed before too. My argument is that a null pointer does not point to anything. The only open issue I know of here is whether a compiler is obliged to accept this construct, obliged to diagnose it, or free to randomly decide what to do about it. I wouldn't recommend its use in portable programs.