Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
4.2.0
-
None
-
aCC: HP C/aC++ B3910B A.06.16 [Nov 26 2007]
-
Compiler Warning
Description
Nightly builds with HP aCC 6.16 produce many warnings like the following:
aCC -c -mt -I$(TOPDIR)/include -I$(BUILDDIR)/include -AA +O2 +DD64 +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 \ $(TOPDIR)/src/ti_wnum_put.cpp "$(TOPDIR)/include/string", line 842: warning #4232-D: conversion from "wchar_t *" to a more strictly aligned type "__rw::__string_ref<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> *" 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=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>]" at line 899 instantiation of "void std::basic_string<_CharT, _Traits, _Allocator>::_C_unlink(_Allocator::pointer) [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>]" at line 198 instantiation of "std::basic_string<_CharT, _Traits, _Allocator>::~basic_string() [with _CharT=wchar_t, _Traits=std::char_traits<wchar_t>, _Allocator=std::allocator<wchar_t>]" at line 99 of "$(TOPDIR)/include/loc/_num_put.cc" instantiation of "_OutputIter std::num_put<_CharT, _OutputIter>::_C_put(_OutputIter, std::ios_base &, _CharT, int, const void *) const [with _CharT=wchar_t, _OutputIter=std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t>>]" at line 183 of "$(TOPDIR)/include/loc/_num_put.h"
Here's the count from a recent build:
$ gunzip -c hpux-11.31-ia64-acc-6.16-12S-645002-log.gz | grep "include/string\", .*: warning #4232" | wc -l 87