Details

    • Type: Bug
    • Status: Closed
    • Priority: P5
    • Resolution: Not an Issue
    • Affects Version/s: 9
    • Fix Version/s: tbd
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
      2d

      Description

      I am getting this warning from some (closed source) code in the JDK Linux build

      warning: comparison is always false due to limited range of data type [-Wtype-limits]

      The code in question is using enums as in

      enum myenum { v1, v2, v3, v4);

      myenum val;
      ...
      ..
      if ( val < v1) { problem }} ;

      So the code seems reasonable
      I found a discussion here :-
      http://gcc.gnu.org/ml/gcc-patches/2012-05/msg00972.html
      and it also seems that this ...
      http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51712

      added the new option : fno-short-enums

      I doubt that's supported yet by the gcc we use but the later comments
      conclude that should not have been needed as the warning really
      should not be raised anyway.

      I'm filing this mainly for documentation purposes.
      I'm not sure what we can do to suppress it now other than disable this class of warning.

        Attachments

          Activity

            People

            • Assignee:
              prr Philip Race
              Reporter:
              prr Philip Race
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: