This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/36651] 64-bit enumerator incorrectly demoted to 32 bits
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jun 2008 12:50:19 -0000
- Subject: [Bug c/36651] 64-bit enumerator incorrectly demoted to 32 bits
- References: <bug-36651-10113@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from joseph at codesourcery dot com 2008-06-27 12:50 -------
Subject: Re: New: 64-bit enumerator incorrectly demoted to 32
bits
On Fri, 27 Jun 2008, jjk at acm dot org wrote:
> When I asked about this on gcc-help, Andrew Haley <aph@redhat.com> wrote:
> > It's a bug. C99 says an enumerated type shall be large enough to
> > represent all its members, and that when promoting the rank of the
> > enumerated type shall equal the rank of the compatible integer type.
If there is a bug here, it relates to a GNU extension and has nothing to
do with C99. C99 requires that all enumeration constants have values
representable as int.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36651