This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++ [io]fstream cannot open file in binary mode (g++ and egcs)
- To: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Subject: Re: libstdc++ [io]fstream cannot open file in binary mode (g++ and egcs)
- From: Per Bothner <per at bothner dot com>
- Date: 26 Jan 2000 10:35:25 -0800
- Cc: uue at pauzner2 dot dnttm dot rssi dot ru, gcc-bugs at gcc dot gnu dot org
- References: <200001260857.JAA03506@loewis.home.cs.tu-berlin.de>
"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/