public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/8914: parentheses not accepted around constructor call in return statement
@ 2002-12-12  8:18 reichelt
  0 siblings, 0 replies; 2+ messages in thread
From: reichelt @ 2002-12-12  8:18 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, tkarkanis

Synopsis: parentheses not accepted around constructor call in return statement

State-Changed-From-To: open->closed
State-Changed-By: reichelt
State-Changed-When: Thu Dec 12 08:18:00 2002
State-Changed-Why:
    This is a well-known bug, see
    http://gcc.gnu.org/bugs.html#parsing

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8914


^ permalink raw reply	[flat|nested] 2+ messages in thread

* c++/8914: parentheses not accepted around constructor call in return statement
@ 2002-12-12  7:56 tkarkanis
  0 siblings, 0 replies; 2+ messages in thread
From: tkarkanis @ 2002-12-12  7:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         8914
>Category:       c++
>Synopsis:       parentheses not accepted around constructor call in return statement
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 12 07:56:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     tkarkanis@aw.sgi.com
>Release:        3.2
>Organization:
>Environment:
Red Hat Linux
>Description:
If a return statement has parentheses around the expression, and the expression returns a temporary object created by calling the constructor without arguments, g++ emits a parse error.  See attached file.  This problem seems to exist in many versions of gcc.  A workaround is to remove the parentheses enclosing the return expression.
>How-To-Repeat:
g++ -c return.cpp
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="return.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="return.cpp"

Y2xhc3MgRm9vCnsKcHVibGljOgogICAgRm9vKCk7CiAgICBGb28oIGludCApOwp9OwoKRm9vIGYo
KQp7CiAgICAvLyByZXR1cm4gRm9vKCk7ICAgICAgIC8vIHdvcmtzCiAgICAvLyByZXR1cm4oIEZv
bygwKSApOyAgIC8vIHdvcmtzCiAgICByZXR1cm4oIEZvbygpICk7ICAgICAgIC8vIGZhaWxzCn0K


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-12-12 16:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-12  8:18 c++/8914: parentheses not accepted around constructor call in return statement reichelt
  -- strict thread matches above, loose matches on Subject: below --
2002-12-12  7:56 tkarkanis

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).