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

[HP cadvise] bogus error #2101 with -Aa and for loop

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • External
    • None
    • HP casdvise with aCC 3.73

    Description

      -------- Original Message --------
      Subject: bogus cadvise error #2101 on -Aa
      Date: Wed, 04 Apr 2007 14:41:54 -0600
      From: Martin Sebor <sebor@roguewave.com>
      Organization: Rogue Wave Software
      To: acxx@cup.hp.com

      cadvise doesn't seem to know that -Wc,-ansi_for_scope,on is included in -Aa.

      Martin

      $ cat t.cpp && aCC -Aa -V t.cpp && cadvise aCC -Aa -V t.cpp
      int main ()
      {
      for (int i = 0; ; );
      for (int i = 0; ; );
      }

      aCC: HP ANSI C++ B3910B A.03.73
      92453-07 linker command s800.sgs ld PA64 B.11.45 REL 050725
      /usr/ccs/bin/ld: 92453-07 linker linker ld B.11.45 050725
      aCC: HP ANSI C++ B3910B A.03.73
      92453-07 linker command s800.sgs ld PA64 B.11.45 REL 050725
      /usr/ccs/bin/ld: 92453-07 linker linker ld B.11.45 050725
      "/build/sebor/stdcxx-aCC-3.73-12D/examples/t.cpp", line 4: warning #2128-D:
      loop is not reachable from preceding code
      for (int i = 0; ; );
      ^

      "/build/sebor/stdcxx-aCC-3.73-12D/examples/t.cpp", line 4: error #2101: "i"
      has already been declared in the current scope
      for (int i = 0; ; );
      ^

      1 error detected in the compilation of
      "/build/sebor/stdcxx-aCC-3.73-12D/examples/t.cpp".
      cadvise: warning 108: error while analyzing file "t.cpp"

      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: