This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/15236] pedantic switch modifies treatment of non-ISO compliant enumerations


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]