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

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: External
    • Labels:
      None
    • Environment:

      HP C/aC++ B3910B A.06.16 [Nov 26 2007]

    • Severity:
      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

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

                Dates

                • Created:
                  Updated: