------- Comment #4 from 3dw4rd at verizon dot net  2009-08-10 19:35 -------
(In reply to comment #2)
> Since the C++0x changes to fstream are only additions, the simplest solution 
> is
> probably to compile src/fstream-inst.cc in c++0x mode, which just means adding
> new targets to src/Makefile.am so that -std=gnu++0x is used.
> 
> I'll test that fix tonight if noone beats me to it.
> 
> The problem seems to be present on the 4.4 branch as well as trunk.
> 

I'm confused because the definitions of these functions are in the header
include/std/fstream.  I thought that inclusion of the header with the
-std=c++0x flag would get the definition or that if PCH is used, at least one
would have been compiled with -std=gnu++0x and provide the definition.

I would have thought ODR would prevent having the definition here and in
src/fstream-inst.cc.

Or are you saying we should either:
1) move definition open(std::string) etc. to src/fstream-inst.cc (or maybe
better src/fstream-inst_c++0x.cc to be consistent with other treatments).
2) move definition open(std::string) etc. to src/fstream-inst_c++0x.cc
   AND
   move definition open(const char *) etc. to src/fstream-inst.cc
   for consistency


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41005

Reply via email to