------- Comment #4 from rguenth at gcc dot gnu dot org  2010-01-01 17:09 -------
I can't make sens of

      /* If primop0 was sign-extended and unsigned comparison specd,
         we did a signed comparison above using the signed type bounds.
         But the comparison we output must be unsigned.

         Also, for inequalities, VAL is no good; but if the signed
         comparison had *any* fixed result, it follows that the
         unsigned comparison just tests the sign in reverse
         (positive values are LE, negative ones GE).
         So we can generate an unsigned comparison
         against an extreme value of the signed type.  */

      if (unsignedp && !unsignedp0)
        {
          if (val != 0)
            switch (code)
              {
              case LT_EXPR:
              case GE_EXPR:
                primop1 = TYPE_MIN_VALUE (type);
                val = 0;
                break;

              case LE_EXPR:
              case GT_EXPR:
                primop1 = TYPE_MAX_VALUE (type);
                val = 0;
                break;

              default:
                break;
              }
          type = c_common_unsigned_type (type);
        }

but the code dates back to rev. 278 and is from rms ...

So I'm testing a remove of that code.


-- 


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

Reply via email to