1 Known Bugs and Issues

READ FIRST

GCC 3.2.3 Documentation page.

libstdc++/9659: 3.3/3.4 seekoff overload problem with optimization

Error

if you get something like:
$ g++ -c -O3 x.cc

/usr/include/c++/3.2.3/bits/fstream.tcc: In member function `_Traits::pos_type
   std::basic_filebuf<_CharT, _Traits>::seekoff(_Traits::off_type,
   std::_Ios_Seekdir, std::_Ios_Openmode) [with _CharT = char, _Traits =
   std::char_traits<char>]':
/usr/include/c++/3.2.3/bits/fstream.tcc:95:   instantiated from `std::basic_filebuf<_CharT, _Traits>* std::basic_filebuf<_CharT, _Traits>::open(const char*, std::_Ios_Openmode) [with _CharT = char, _Traits = std::char_traits<char>]'
/usr/include/c++/3.2.3/fstream:375:   instantiated from `void std::basic_ifstream<_CharT, _Traits>::open(const char*, std::_Ios_Openmode) [with _CharT = char, _Traits = std::char_traits<char>]'
CDataStream.h:26:   instantiated from here
/usr/include/c++/3.2.3/bits/fstream.tcc:454: ambiguous overload for `
   std::streampos& + char* const&' operator
/usr/include/c++/3.2.3/bits/fstream.tcc:454: candidates are: operator+(int,
   char*) <built-in>
/usr/include/c++/3.2.3/bits/fpos.h:87:                 std::fpos<_StateT>
   std::fpos<_StateT>::operator+(long int) [with _StateT = mbstate_t] <near
   match>

Explanation of the issue

It seems to be related to the patch for libstdc++/9439 and libstdc++/9425 that was introduced recently.

Workaround or Fix

change optimization level from -O3 to -O2


-- AnarManafov - 26 Mar 2005
Topic revision: r1 - 2005-03-26, AnarManafov
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback
Imprint (in German)
Privacy Policy (in German)