Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-889

[HP aCC 6.16] bogus warning #4276 on (-0x7fffffff - 1)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • External
    • None
    • aCC: HP C/aC++ B3910B A.06.16 [Nov 26 2007]

    • Compiler Warning

    Description

      The warning below is incorrect – the relational operator clearly evaluates to true.

      $ cat t.cpp && aCC +w -V t.cpp && ./a.out && echo PASS
      #include <assert.h>
      
      int main ()
      {
          int x = 0;
          assert (-0x7fffffff - 1 < x);
      }
      aCC: HP C/aC++ B3910B A.06.16 [Nov 26 2007]
      "t.cpp", line 6: warning #4276-D: relational operator "<" always 
      evaluates to
                'false'
            assert (-0x7fffffff - 1 < x);
                                    ^
      
      ld: 92453-07 linker ld HP Itanium(R) B.12.41  IPF/IPF
      PASS
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sebor Martin Sebor
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: