Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-726 [HP aCC 6.16] many cadvise warnings
  3. STDCXX-781

[HP aCC 6.16] out of bound warnings 20206 and 20208 in 23.bitset.cons.stdcxx-297.cpp

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 4.2.0
    • 4.2.2
    • 21. Strings
    • None
    • $ uname -sr && aCC -V
      HP-UX B.11.31
      aCC: HP C/aC++ B3910B A.06.16 [Nov 26 2007]

    Description

      When compiled with HP aCC 6.16 with +w +O, the test 23.bitset.cons.stdcxx-297.cpp produces the following warning out of the _traits.h header:

      aCC -c -I$(TOPDIR)/include -I$(BUILDDIR)/include -I$(TOPDIR)/tests/include  -AA  +O2  +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 \
          $(TOPDIR)/tests/regress/23.bitset.cons.stdcxx-297.cpp
      "$(TOPDIR)/include/string", line 842: warning #4232-D: conversion from "int *" to a more strictly aligned type "__rw::__string_ref<int, std::char_traits<int>, std::allocator<int>> *" may cause misaligned access
                return _RWSTD_REINTERPRET_CAST (_C_string_ref_type*, _C_data) - 1; 
                       ^
                detected during:
                  instantiation of "__rw::__string_ref<_Traits::char_type, _Traits, _Allocator> *std::basic_string<_CharT, _Traits, _Allocator>::_C_pref() const [with _CharT=int, _Traits=std::char_traits<int>, _Allocator=std::allocator<int>]" at line 899
                  instantiation of "void std::basic_string<_CharT, _Traits, _Allocator>::_C_unlink(_Allocator::pointer) [with _CharT=int, _Traits=std::char_traits<int>, _Allocator=std::allocator<int>]" at line 198
                  instantiation of "std::basic_string<_CharT, _Traits, _Allocator>::~basic_string() [with _CharT=int, _Traits=std::char_traits<int>, _Allocator=std::allocator<int>]" at line 42 of "$(TOPDIR)/tests/regress/23.bitset.cons.stdcxx-297.cpp"
      
      "$(TOPDIR)/include/rw/_traits.h", line 333, procedure main: warning #20208-D: Forming out of bound address (In expression "(const int*)(&(&std::basic_string<int, std::char_traits<int>, std::allocator<int>>::_C_null_ref)-><compiler generated undef>_0+1)+1", &(&std::basic_string<int, std::char_traits<int>, std::allocator<int>>::_C_null_ref)-><compiler generated undef>_0+1 (type: struct __rw::__string_ref<std::basic_string<int, std::char_traits<int>, std::allocator<int>>::value_type, std::basic_string<int, std::char_traits<int>, std::allocator<int>>::traits_type, std::basic_string<int, std::char_traits<int>, std::allocator<int>>::allocator_type> ) (defined by &(&std::basic_string<int, std::char_traits<int>, std::allocator<int>>::_C_null_ref)-><compiler generated undef>_0) has byte range [0 .. 23], forming address byte range [28 .. 31].)
      
      "$(TOPDIR)/include/rw/_traits.h", line 314, procedure main: warning #20206-D: Out of bound access (In expression "&(&std::basic_string<int, std::char_traits<int>, std::allocator<int>>::_C_null_ref)-><compiler generated undef>_0+1", &(&std::basic_string<int, std::char_traits<int>, std::allocator<int>>::_C_null_ref)-><compiler generated undef>_0 (type: struct __rw::__string_ref<std::basic_string<int, std::char_traits<int>, std::allocator<int>>::value_type, std::basic_string<int, std::char_traits<int>, std::allocator<int>>::traits_type, std::basic_string<int, std::char_traits<int>, std::allocator<int>>::allocator_type> ) has byte range [0 .. 23], reading byte range [24 .. 47].)
      

      Attachments

        Issue Links

          Activity

            People

              sebor Martin Sebor
              scottz Scott (Yu) Zhong
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 2h
                  2h
                  Remaining:
                  Remaining Estimate - 2h
                  2h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified