Details
-
Sub-task
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
4.2.0
-
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
- is a clone of
-
STDCXX-780 [HP aCC 6.16] warning #20206-D: Out of bound access in rw_streambuf.h
- Resolved
- is cloned by
-
STDCXX-782 [HP aCC 6.16] warning #20206-D: Out of bound access in 23.bitset.cpp
- Open