Problem with gcc3.0 and fstream.h

jnance@numeritech.com jnance@numeritech.com
Tue Feb 20 07:43:00 GMT 2001


Hello All,
    I found a problem with gcc3.0 (from CVS last week).  It seems that
fstream.h does not work if the -fno-for-scope flag is given to the compiler:

tarheels> cat x.cpp 
#include <fstream.h>
int main() {return 0;}

tarheels> /tools/Lunix/bin/g++ -fno-for-scope -o /dev/null x.cpp
In file included from /tools/Lunix/include/g++-v3/bits/std_locale.h:39,
                 from /tools/Lunix/include/g++-v3/bits/std_fstream.h:40,
                 from /tools/Lunix/include/g++-v3/fstream.h:31,
                 from x.cpp:1:
/tools/Lunix/include/g++-v3/bits/locale_facets.tcc: In function `_InIter 
   std::__match_parallel(_InIter, _InIter, int, const std::basic_string<_CharT, 
   std::char_traits<_CharT>, std::allocator<_T2> >*, int*, int&, bool&)':
/tools/Lunix/include/g++-v3/bits/locale_facets.tcc:146: redeclaration of `int 
   __ti'
/tools/Lunix/include/g++-v3/bits/locale_facets.tcc:127: `int __ti' previously 
   declared here

Thanks,


Jim



More information about the Gcc-bugs mailing list