🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #2872

Re: Extremely minor bug with enumerations

#2872
From: Ronald Guilmette
Date: Sat, 17 Feb 1990 21:46
14 lines
1044 bytes
In article <9002161652.AA01478@armory> kendall%saber@HARVARD.HARVARD.EDU writes:
>This file should not compile (gcc -c t.c), but does:
>
>	enum foo { a = sizeof (enum foo) };
>
>Although the ANSI draft (3.5.2.2) doesn't specify, the type `enum foo'
>should not be complete until the closing right brace.  For example, in
>an implementation that puts some enums into single bytes, the size of
>`enum foo' can't be known until after the close brace.

I believe that such code is legal, but perhaps someone with more authority
will comment.

// rfg
Technical Details
Message-ID: <25DDC633.19611@paris.ics.uci.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!brutus.cs.uiuc.edu!jarthur!uci-ics!rfg
References: <9002161652.AA01478@armory>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!brutus.cs.uiuc.edu!jarthur!uci-ics!rfg
From: rfg@ics.uci.edu (Ronald Guilmette)
Newsgroups: gnu.gcc.bug,comp.lang.c++,comp.std.c
Subject: Re: Extremely minor bug with enumerations
Message-ID: <25DDC633.19611@paris.ics.uci.edu>
Date: 17 Feb 90 21:46:28 GMT
References: <9002161652.AA01478@armory>
Reply-To: rfg@ics.uci.edu (Ronald Guilmette)
Distribution: gnu
Organization: UC Irvine Department of ICS
Lines: 14