https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102440

            Bug ID: 102440
           Summary: Uinteger Opt/Param but the underlying type is signed
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: linkw at gcc dot gnu.org
  Target Milestone: ---

The UInteger type in Opt/Param declaration can easily confuse people that the
variable for this option/parameter is unsigned.  But actually the internal
implementation uses signed for it, it requires users to add explicit type
conversion for some cases, otherwise the bootstrapping fails due to -Werror.
I guess the "UInteger" is mainly to restrict the value range of
option/parameter.  But I think we still can improve it? Like using one
anonymous union with uinteger and integer instead of a single integer, then
name the corresponding member as signedness?

File this as Segher's suggestion from patch reviewing.

Reply via email to