[Bug c/12237] wrong code generated due to wrong static evaluation of a signed/unsigned comparison

ebotcazou at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Sep 10 11:06:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12237


ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2003-09-10 11:06 -------
Quoting ISO C99:

§6.3.1.8 Usual arithmetic conversions

  #1 [...] Otherwise, the integer promotions are performed on both operands.
     Then the following rules are applied to the promoted operands:
       [...]
       Otherwise, if the operand that has unsigned
       integer type has rank greater or equal to the rank
       of the type of the other operand, then the operand
       with signed integer type is converted to the type
       of the operand with unsigned integer type.



More information about the Gcc-bugs mailing list