public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/8237: parse error for legal code - works on intel and solaris compilers
@ 2003-01-01 14:09 neroden
0 siblings, 0 replies; 5+ messages in thread
From: neroden @ 2003-01-01 14:09 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, joel.zuhars, nobody
Synopsis: parse error for legal code - works on intel and solaris compilers
State-Changed-From-To: suspended->closed
State-Changed-By: neroden
State-Changed-When: Wed Jan 1 06:09:55 2003
State-Changed-Why:
This compiles cleanly on mainline as of 2003-01-01. Interestingly, a bunch of the other 'parse errors on simple code', such as the ones documented on the web page, *don't*.
I'm closing this. I'm also creating the test case g++.dg/parse/parens1.C, which I'll commit
once it's been reviewed (it might be reasonable to make it simpler).
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8237
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: c++/8237: parse error for legal code - works on intel and solaris compilers
@ 2002-10-15 17:16 Phil Edwards
0 siblings, 0 replies; 5+ messages in thread
From: Phil Edwards @ 2002-10-15 17:16 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/8237; it has been noted by GNATS.
From: Phil Edwards <phil@jaj.com>
To: joel.zuhars@med.ge.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/8237: parse error for legal code - works on intel and solaris compilers
Date: Tue, 15 Oct 2002 20:10:57 -0400
On Tue, Oct 15, 2002 at 10:51:55PM -0000, joel.zuhars@med.ge.com wrote:
> >Description:
> Hello, the following simple code gives a parse error when compiling
> with g++, but works on both intel and solaris compilers. Is it a bug,
> or am I just missing something obvious? Thanks for any help.
Go to
http://gcc.gnu.org/bugs.html#known
and scroll all the way down to "parse errors for simple code" for some
possible workarounds. As Gabriel says, this should be fixed in the ongoing
parser rewrite.
--
I would therefore like to posit that computing's central challenge, viz. "How
not to make a mess of it," has /not/ been met.
- Edsger Dijkstra, 1930-2002
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: c++/8237: parse error for legal code - works on intel and solaris compilers
@ 2002-10-15 16:16 Gabriel Dos Reis
0 siblings, 0 replies; 5+ messages in thread
From: Gabriel Dos Reis @ 2002-10-15 16:16 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/8237; it has been noted by GNATS.
From: Gabriel Dos Reis <gdr@integrable-solutions.net>
To: joel.zuhars@med.ge.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/8237: parse error for legal code - works on intel and solaris compilers
Date: 16 Oct 2002 01:08:09 +0200
joel.zuhars@med.ge.com writes:
| Hello, the following simple code gives a parse error when compiling
| with g++, but works on both intel and solaris compilers. Is it a
| bug, or am I just missing something obvious? Thanks for any help.
|
[...]
| int main() {
| B(A()).form();
Known bug. See section "Parse errors for "simple" code" at
http://gcc.gnu.org/bugs.html#known
-- Gaby
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: c++/8237: parse error for legal code - works on intel and solaris compilers
@ 2002-10-15 16:09 gdr
0 siblings, 0 replies; 5+ messages in thread
From: gdr @ 2002-10-15 16:09 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, joel.zuhars, nobody
Synopsis: parse error for legal code - works on intel and solaris compilers
State-Changed-From-To: open->suspended
State-Changed-By: gdr
State-Changed-When: Tue Oct 15 16:09:35 2002
State-Changed-Why:
Known bug. Hopefully solved by the new parser.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8237
^ permalink raw reply [flat|nested] 5+ messages in thread
* c++/8237: parse error for legal code - works on intel and solaris compilers
@ 2002-10-15 15:56 joel.zuhars
0 siblings, 0 replies; 5+ messages in thread
From: joel.zuhars @ 2002-10-15 15:56 UTC (permalink / raw)
To: gcc-gnats
>Number: 8237
>Category: c++
>Synopsis: parse error for legal code - works on intel and solaris compilers
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Tue Oct 15 15:56:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Joel Zuhars
>Release: gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110)
>Organization:
>Environment:
Linux on intel machine
>Description:
Hello, the following simple code gives a parse error when compiling with g++, but works on both intel and solaris compilers. Is it a bug, or am I just missing something obvious? Thanks for any help.
> cat testVec.C
#include <stdio.h>
class A {
public:
A() { printf("Acon\n"); }
};
class B {
public:
B(A a) { printf("BAcon\n"); }
void form() { printf("Bform\n"); }
};
int main() {
B(A()).form();
}
brutus [joel]: /home/joel/tvec[21]
> g++ testVec.C -o TestVec
testVec.C: In function `int main ()':
testVec.C:16: parse error before `.'
brutus [joel]: /home/joel/tvec [22]
> icc testVec.C -o TestVec
testVec.C
brutus [joel]: /home/joel/tvec [23]
> TestVec
Acon
BAcon
Bform
brutus [joel]: /home/joel/tvec [24]
> g++ -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110)
>How-To-Repeat:
>Fix:
use "A a; B(a).form();" instead of "B(A()).form();"
or add constructor A(int i) and use "B(A(1)).form();"
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-01-01 14:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-01 14:09 c++/8237: parse error for legal code - works on intel and solaris compilers neroden
-- strict thread matches above, loose matches on Subject: below --
2002-10-15 17:16 Phil Edwards
2002-10-15 16:16 Gabriel Dos Reis
2002-10-15 16:09 gdr
2002-10-15 15:56 joel.zuhars
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).