c++/2049: gcc 2.95/3.0 gives syntax error
igodard@rational.com
igodard@rational.com
Sun Apr 1 00:00:00 GMT 2001
>Number: 2049
>Category: c++
>Synopsis: gcc 2.95/3.0 gives syntax error
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Tue Feb 20 22:16:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Ivan Godard
>Release: GNU C++ version 3.0 20010220 (prerelease) (i386-pc-linux-gnu)
>Organization:
>Environment:
Linux pine 2.2.12-20smp #1 SMP Mon Sep 27 10:34:45 EDT 1999 i686 unknown
>Description:
igodard@pine <373> gcc -c test2.cpp
test2.cpp: In function `int main()':
test2.cpp:12: parse error before `=='
Note: also fails on 2.95
>How-To-Repeat:
class C {
public:
C(bool b) {}
int i;
};
int main() {
int x;
int y;
int* p;
C(x == y);
C(p[0] == p[1]);
}
>Fix:
Make expression more complex: C(x==x && p[0] == p[1]);
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-prs
mailing list