https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84667

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dmalcolm at gcc dot gnu.org

--- Comment #4 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
FWIW, I'm also seeing:

auxtypes.cpp: In member function ‘aux::xstrbuf<xchar>&
aux::xstrbuf<xchar>::operator=(const char*) [with xchar = short int]’:
auxtypes.cpp:240:3: warning: ‘blen’ is used uninitialized in this function
[-Wuninitialized]
   assignByLength( blen, s );   // side effect input; base_str::length
   ^~~~~~~~~~~~~~
auxtypes.cpp: In member function ‘aux::xstrbuf<xchar>&
aux::xstrbuf<xchar>::operator=(const char*) [with xchar = int]’:
auxtypes.cpp:240:3: warning: ‘blen’ is used uninitialized in this function
[-Wuninitialized]
   assignByLength( blen, s );   // side effect input; base_str::length
   ^~~~~~~~~~~~~~
auxtypes.cpp: In member function ‘aux::xstrbuf<xchar>&
aux::xstrbuf<xchar>::operator=(const char*) [with xchar = signed char]’:
auxtypes.cpp:240:3: warning: ‘blen’ is used uninitialized in this function
[-Wuninitialized]
   assignByLength( blen, s );   // side effect input; base_str::length
   ^~~~~~~~~~~~~~

utf8len presumably is meant to write back to &blen in the line above, but the
decl and defn of the:
  strsize utf8len( const char *buf, strsize *byte_length = NULL );
overload are labelled "pure".  Removing the "pure" fixes that warning.

Reply via email to