This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/7440: parse error on valid C++ code (parse error before `&&' token)
- From: gsd at dolphin dot fr
- To: gcc-gnats at gcc dot gnu dot org
- Date: 30 Jul 2002 07:38:11 -0000
- Subject: c++/7440: parse error on valid C++ code (parse error before `&&' token)
- Reply-to: gsd at dolphin dot fr
>Number: 7440
>Category: c++
>Synopsis: parse error on valid C++ code (parse error before `&&' token)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Tue Jul 30 00:46:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: gsd@dolphin.fr
>Release: gcc (GCC) 3.1.1
>Organization:
>Environment:
Solaris 2.5.1
>Description:
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
This code compiles fine with gcc-3.1.1 (C), gcc-2.95.3 (C), g++-2.95.3 (C++), MS Visual C++ (C/C++).
>How-To-Repeat:
Compile the following source using g++:
inline const long and(const long L, const long R) { return (L && R); }
>Fix:
unknown
>Release-Note:
>Audit-Trail:
>Unformatted: