This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/9687: The & operator does not accept parentheses on operand
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: bangerth at dealii dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, marc dot durantez at jp dot sony dot com, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
- Date: Sat, 15 Feb 2003 12:07:48 +0000
- Subject: Re: c++/9687: The & operator does not accept parentheses on operand
- Organization: Codesourcery LLC
- References: <20030214213311.1926.qmail@sources.redhat.com>
bangerth@dealii.org wrote:
Synopsis: The & operator does not accept parentheses on operand
State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Fri Feb 14 21:33:11 2003
State-Changed-Why:
The C++ standard even has wording to disallow using parentheses.
Previous versions of gcc accepted the code erroneously. This
has been fixed.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9687
Are you sure? &(T::member) is disallowed, but I don't think &(random_expr) is.
Could you explain your deduction to me?
FWIW, I think this is a parse error as (MyClass ()) looks like a cast expression
to function type, without the trailing expr. I.e. It thought it was seeing
(MyClass ())thing
I fixed this in the new parser.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
The voices in my head said this was stupid too
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org