This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: libstdc++ [io]fstream cannot open file in binary mode (g++ and egcs)


"Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de> writes:

>      ifstream(const char *name, int mode=ios::in, int prot=0664)
> -	: fstreambase(name, mode, prot) { }
> +	: fstreambase(name, mode | ios::in, prot) { }
>      void open(const char *name, int mode=ios::in, int prot=0664)
> -	{ fstreambase::open(name, mode, prot); }
> +	{ fstreambase::open(name, mode | ios::in, prot); }

I have a feeling may not be correct.  I remember receiving similar
bug reports and suggestions.  It seemed like an obvious fix - but
but doing so violated the C++ Standard.  Things may be different
in this case, but you should make sure.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]