This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/17844] -fshort-enums: ISO/IEC 9899:1999 : wrong size of identifier in enumerator list
- From: "jsm at polyomino dot org dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Oct 2004 15:47:06 -0000
- Subject: [Bug c/17844] -fshort-enums: ISO/IEC 9899:1999 : wrong size of identifier in enumerator list
- References: <20041005145327.17844.heinrich.brand@fujitsu-siemens.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From jsm at polyomino dot org dot uk 2004-10-05 15:47 -------
Subject: Re: -fshort-enums: ISO/IEC 9899:1999 : wrong size of
identifier in enumerator list
On Tue, 5 Oct 2004, pinskia at gcc dot gnu dot org wrote:
> Invalid, this is what the option -fshort-enum does, it violates the C
> standard :).
Wrong. It changes the type with which enums are compatible to a different
type which also conforms to the C standard. Regardless of the type with
which an enum is compatible, the enumeration constants should have type
int - not the enumeration type.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17844