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

[HP aCC 6.16] warning #4232 in <string>: conversion from "wchar_t *" to a more strictly aligned type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.2.0
    • 4.2.1
    • 21. Strings
    • 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
      

      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 - 1h Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h
                2h