This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
2 bugs in gcc-2.95.2
- To: gcc-bugs at gcc dot gnu dot org
- Subject: 2 bugs in gcc-2.95.2
- From: "M. V. S. Ramanath" <ram at curvesoft dot com>
- Date: Sat, 14 Oct 2000 07:55:49 -0800
Hi,
Here are a couple of bug reports:
1.--------------------
egcs-1.1.2 and gcc-2.95.2 both appear to have this bug:
Near line 301 of bastring.h we have this:
const charT* c_str () const
{ if (length () == 0) return ""; terminate (); return data (); }
However, when I use basic_string<wchar_t>::c_str(), gcc complains
because "" is not a wide string (charT* is wchar_t* in this case).
Removing the entire if-statement fixes the problem.
2.-----------------------
gcc-2.95.2 on Solaris 7 miscompiles conditional expressions
involving literal wide strings; egcs-1.1.2 on RH6.2 does not have
this problem and works ok.
For example, the expression: (b ? L"a" : L"b") always yields L"a"
regardless of the value of 'b'.
Ram