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/12237] wrong code generated due to wrong static evaluation of a signed/unsigned comparison


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.


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