This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/7440: parse error on valid C++ code (parse error before `&&' token)
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: gdr at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 30 Jul 2002 08:06:00 -0000
- Subject: Re: c++/7440: parse error on valid C++ code (parse error before `&&' token)
- Reply-to: Gabriel Dos Reis <gdr at integrable-solutions dot net>
The following reply was made to PR c++/7440; it has been noted by GNATS.
From: Gabriel Dos Reis <gdr@integrable-solutions.net>
To: gsd@dolphin.fr
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/7440: parse error on valid C++ code (parse error before `&&' token)
Date: 30 Jul 2002 10:02:02 +0200
gsd@dolphin.fr writes:
[...]
| Compiling the one line C++ source file using g++:
|
| inline const long and(const long L, const long R) { return (L && R); }
^^^
|
| produces the error message:
|
| 1: parse error before `&&' token
Indeed. This is not a bug in the compiler. It is a bug in your
program source: "and" is an alternate spelling for "&&" so you cannot
use it as a regular identifier.
-- Gaby