This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/9687: The & operator does not accept parentheses on operand


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]