In file stor-layout.c ,function fixup_unsigned_type have next some statement:

  TYPE_UNSIGNED (type) = 1;
  set_min_and_max_values_for_integral_type (type, precision,
                                            /*is_unsigned=*/true);
  /* Lay out the type: set its alignment, size, etc.  */
  layout_type (type);

Function layout_type have some statement:

    case INTEGER_TYPE:
    case ENUMERAL_TYPE:
      if (TREE_CODE (TYPE_MIN_VALUE (type)) == INTEGER_CST
          && tree_int_cst_sgn (TYPE_MIN_VALUE (type)) >= 0)
        TYPE_UNSIGNED (type) = 1;

So "TYPE_UNSIGNED (type) = 1;" in fixup_unsigned_type may be deleted.


-- 
           Summary: "TYPE_UNSIGNED (type) = 1;" in fixup_unsigned_type may
                    be deleted
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: lhuayu at gmail dot com


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

Reply via email to