This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/15236] pedantic switch modifies treatment of non-ISO compliant enumerations
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Apr 2004 21:21:34 -0000
- Subject: [Bug c/15236] pedantic switch modifies treatment of non-ISO compliant enumerations
- References: <20040430201707.15236.kevin.hall@motioneng.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-30 21:21 -------
Confirmed, in fact there is an XXX in the code now:
pedwarn ("ISO C restricts enumerator values to range of `int'");
/* XXX This causes -pedantic to change the meaning of the program.
Remove? -zw 2004-03-15 */
value = convert (integer_type_node, value);
1.133 (aoliva 26-Jul-00): value = convert (integer_type_node, value);
1.1 (law 11-Aug-97): pedwarn ("ANSI C restricts enumerator values to range of `int'");
1.1 (law 11-Aug-97): value = integer_zero_node;
revision 1.133
date: 2000/07/26 03:50:56; author: aoliva; state: Exp; lines: +19 -3
* c-decl.c (finish_enum): Convert enumerations that fit in an
`int' to `int'.
(build_enumerator): In pedantic mode, cast to `int' those that
don't.
The patch which caused part of the regression: <http://gcc.gnu.org/ml/gcc-patches/2000-07/
msg00993.html>, there might be another which caused the regression which this patch is fixing.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |aoliva at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-04-30 21:21:33
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15236