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

[HP aCC 6.16] many +wperfadvice warninsg for std::endl in examples

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 4.2.1
    • 4.2.2
    • Examples
    • None
    • aCC: HP C/aC++ B3910B A.06.16 [Nov 26 2007]

    • Compiler Warning

    Description

      Compiling examples with HP aCC 6.16 with the +wperfadvice option on produces many warnings like the one below:

      aCC -c -mt -I/amd/devco/sebor/stdcxx-4.2.x/include \
          -I/build/sebor/stdcxx-4.2.x-aCC-6.16-12d/include \
          -I/amd/devco/sebor/stdcxx-4.2.x/examples/include \
          -AA +wperfadvice +W20302 +O2   +w \
          +W392,655,684,818,819,849 +W2193,2236,2261,2340,2401,2487 \
          +W4227,4229,4231,4235,4237,4249 +W4255,4272,4284,4285,4286,4296,4297 +W3348 \
          /amd/devco/sebor/stdcxx-4.2.x/examples/manual/accumulate.cpp
      "/amd/devco/sebor/stdcxx-4.2.x/examples/manual/accumulate.cpp", line 60: warning #4320-D: 
                performance advice: std::endl is expensive because it flushes the
                stream. If you do not want to flush the stream replace 'std::endl'
                with '\n' or define macro _HP_NONSTD_FAST_IOSTREAM
                      << "\nThe product = N! = " << prod << std::endl;
                                                            ^
      
      aCC accumulate.o -o accumulate -AA +nostl -Wl,+s   -mt  -L/build/sebor/stdcxx-4.2.x-aCC-6.16-12d/lib  -Wl,+b/build/sebor/stdcxx-4.2.x-aCC-6.16-12d/lib -lstd12d  -lm 
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1m Original Estimate - 1m
                1m
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h
                1h