This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: bug in g++
- From: Gwenole Beauchesne <gbeauchesne at mandrakesoft dot com>
- To: simon at u-bourgogne dot fr
- Cc: bug-gcc at gnu dot org
- Date: Mon, 31 Mar 2003 14:04:13 +0200 (CEST)
- Subject: Re: bug in g++
On Mon, 31 Mar 2003, Gwenole Beauchesne wrote:
> Reproduced with:
> GNU C++ version 3.2.3 20030329 (prerelease) (i686-pc-linux-gnu)
> GNU C++ version 3.4 20030329 (experimental) (i686-pc-linux-gnu)
Reduced to:
/* { dg-do compile } */
int main(void)
{
char x, y;
if ('A' == x) && ('B' == y)) { } /* { error "parse error" } */
if (x == 'A') && (y == 'B')) { } /* { error "parse error" } */
}
Note that GCC 3.2.X gets a correct parse error for the second statement,
though GCC 3.4 would still ICE. Also note that GCC 2.96-RH gives:
/home/gb/vrac/ice.cpp: In function `int main ()':
/home/gb/vrac/ice.cpp:5: parse error before character constant
/home/gb/vrac/ice.cpp:5: confused by earlier errors, bailing out