Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-695 [HP aCC 6.15] lots of noise due to compiler remarks
  3. STDCXX-727

[HP aCC 6.15] remark #4271-D type conversion may lose sign on std::list template ctor

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 4.2.0
    • Fix Version/s: 4.2.1
    • Component/s: 23. Containers
    • Labels:
      None
    • Environment:

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

      Description

      Calling std::list template ctor (like the alg7.cpp example does) triggers the aCC remark below:

      $ cat t.cpp && gmake t  
      #include <list>
      
      int main ()
      {
          std::list<int> l (5, 0);
      }
      aCC -c  -D_RWSTDDEBUG   -mt -I/amd/devco/sebor/stdcxx/include -I/build/sebor/stdcxx-aCC-6.16-15D/include -I/amd/devco/sebor/stdcxx/examples/include  -AA  -g +d  +DD64 +w +W392 +W655 +W684 +W818 +W819 +W849 +W2193 +W2236 +W2261 +W2340 +W2401 +W2487 +W4227 +W4229 +W4231 +W4235 +W4237 +W4249 +W4255 +W4272 +W4284 +W4285 +W4286 +W4296 +W4297 +W3348   t.cpp
      "/amd/devco/sebor/stdcxx/include/list", line 407: remark #4271-D: type
                conversion may lose sign
                _C_init (__first, __last);
                         ^
                detected during:
                  instantiation of "void std::list<_TypeT,
                            _Allocator>::_C_init(_InputIterator, _InputIterator,
                            int) [with _TypeT=int, _Allocator=std::allocator<int>,
                            _InputIterator=int]" at line 416
                  instantiation of "std::list<_TypeT,
                            _Allocator>::list(_InputIterator, _InputIterator, const
                            _Allocator &) [with _TypeT=int,
                            _Allocator=std::allocator<int>, _InputIterator=int]" at
                            line 5 of "t.cpp"
      
      aCC t.o -o t -AA +nostl -Wl,+s   -mt +DD64 -L/build/sebor/stdcxx-aCC-6.16-15D/lib  -Wl,+b/build/sebor/stdcxx-aCC-6.16-15D/lib -lstd15D  -lm 
      

        Attachments

          Activity

            People

            • Assignee:
              sebor Martin Sebor
              Reporter:
              sebor Martin Sebor

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Time Spent - 1h Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - 1h Remaining Estimate - 1h
                1h

                  Issue deployment