From 6604505826783324932
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,e94695845965b249
X-Google-Attributes: gidf78e5,public
X-Google-Thread: 1149ec,e94695845965b249
X-Google-Attributes: gid1149ec,public
X-Google-ArrivalTime: 1992-09-09 06:03:56 PST
Xref: sparky comp.std.c:2595 comp.std.c++:1137
Newsgroups: comp.std.c,comp.std.c++
Path: sparky!uunet!uunet.ca!canrem!telly!druid!pseudo!mjn
From: mjn@pseudo.uucp (Murray Nesbitt)
Subject: Re: Zero-length structures and pointer comparisons
Organization: Private system in Toronto, ON
Date: Wed, 9 Sep 1992 19:38:42 GMT
Message-ID: <MJN.92Sep9113842@pseudo.uucp>
In-Reply-To: fjh@munta.cs.mu.OZ.AU's message of 8 Sep 92 16:14:16 GMT
References: <9225302.22791@mulga.cs.mu.OZ.AU>
Sender: mjn@pseudo.uucp (Murray Nesbitt)
Lines: 16


fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON) writes:

>is the following a legal (strictly conforming) program?
>
>	struct S { unsigned:0; }
>	int main() { return sizeof(S); }

It is not a legal C program, but not due to any particular ANSI
constraints.  It has syntax errors.  Perhaps you meant:

	struct S { unsigned:0; };
	int main() { return sizeof(struct S); }

-- 
Murray


