public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/3406: Parse error on valid expression
@ 2001-06-25 7:36 Bill Somerville
0 siblings, 0 replies; only message in thread
From: Bill Somerville @ 2001-06-25 7:36 UTC (permalink / raw)
To: gcc-gnats
>Number: 3406
>Category: c++
>Synopsis: ( int() > int() ) gives parse error
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Mon Jun 25 07:36:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Bill Somerville
>Release: @gcc_version_full@
>Organization:
Class Design Ltd.
>Environment:
System: Linux wallace.classdesign.com 2.2.9-19mdk #2 Sun Nov 14 18:37:33 GMT 1999 i586 unknown
Architecture: i586
host: @host@
build: @build@
target: @target@
configured with: @gcc_config_arguments@
>Description:
int main()
{
( int() > int() );
return 0;
}
gives:
$ c++ t.cpp
t.cpp: In function `int main()':
t.cpp:3: parse error before `>' token
>How-To-Repeat:
See code sample above. Also fails with user defined type default constructor calls. This was detected in a test harness that exercises comparison operators on default constructed objects - perhaps a similar test should be included in the compiler testsuite.
>Fix:
Not a work around, but if the parenthesis around the offending expression are removed, the expression compiles as expected. In my case not feasable as the expression is mixed with i/o stream inserters.
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-06-25 7:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-25 7:36 c++/3406: Parse error on valid expression Bill Somerville
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).