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]
Other format: [Raw text]

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


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