gcc-3.1: problems with filebuf constructor for FILE*

Jonathan Wakely cow@compsoc.man.ac.uk
Wed Jul 24 09:51:00 GMT 2002


On Wed, Jul 24, 2002 at 09:36:02AM -0700, Scott Johnston wrote:

> No, that doesn't compile for me.  I saved the above program into test.cc and
> compiled with plain vanilla gcc-3.1 on RedHat 6.2, and I got the following
> error messages.


> gcc test.cc
> In file included from /usr/local/include/g++-v3/fstream:48,
>                 from /usr/local/include/g++-v3/ext/stdio_filebuf.h:30,
>                 from test.cc:1:
> /usr/local/include/g++-v3/bits/basic_file.h:52: parse error before `{' token

This is a known problem, caused by installing a new release over an older
release, see http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#4_0

The problem is that an older version of basic_file.h is being found, and
it isn't compatible with the new filebuf classes.

jon


-- 
"Consistency requires you to be as ignorant today as you were a year ago."
	- Bernard Berenson



More information about the Libstdc++ mailing list