libstdc++ [io]fstream cannot open file in binary mode (g++ and egcs)
Per Bothner
per@bothner.com
Wed Jan 26 10:35:00 GMT 2000
"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/
More information about the Gcc-bugs
mailing list