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

[HP aCC 6.16] bogus warning #20200 on trivially safe code

    XMLWordPrintableJSON

Details

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

    • Compiler Warning

    Description

      This warning is obviously incorrect. It goes away with optimization.

      $ cat t.cpp && aCC -V -c +w t.cpp
      int bar () {
      const char *s = 0;
      if (!s)
      s = ";";

      return *s;
      }

      aCC: HP C/aC++ B3910B A.06.16 [Nov 26 2007]
      "t.cpp", line 6, procedure bar: warning #20200-D: Potential null pointer
      dereference through s is detected (null definition:t.cpp, line 2)

      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: