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

[HP aCC 6.16] bogus warning #20200: potential null pointer dereference

Add voteWatch issue
    XMLWordPrintableJSON

    Details

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

      $ uname -sr && aCC -V
      HP-UX B.11.31
      aCC: HP C/aC++ B3910B A.06.16 [Nov 26 2007]

    • Severity:
      Incorrect Behavior

      Description

      This looks like a bug in cadvise/aCC 6:

      $ cat t.cpp && aCC +w -c -V t.cpp
      int bar ();
      
      int foo (int *a, int i)
      {
          int *p;
          if (i) p = a; else p = 0;
      
          if (i)
              return *p;
          return 0;
      }
      
      int foobar (int *a, int i)
      {
          int *p;
          if (i) p = a; else p = 0;
      
          if (bar ())
              if (i)
                  return *p;
          return 0;
      }
      aCC: HP C/aC++ B3910B A.06.16 [Nov 26 2007]
      "t.cpp", line 20, procedure foobar: warning #20200-D: Potential null pointer
                dereference through p is detected (null definition:t.cpp, line 16)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                sebor Martin Sebor

                Dates

                • Created:
                  Updated:

                  Issue deployment