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

Wolfgang Bangerth bangerth@ticam.utexas.edu
Mon Feb 17 19:01:00 GMT 2003

you might be right, thanks for double-checking on me. I shouldn't dismiss 
reports late at night -- I misread this as the &(X::m) problem...

> Are you sure? &(T::member) is disallowed, but I don't think &(random_expr) is.
> Could you explain your deduction to me?

The relevant clause is, stating that the operand shall be an 
lvalue. This has nothing to do with the parenthesis, of course, so I guess 
you're right.

The present state is: 2.95--3.3 rejected the code. 3.4 now simply says
  warning: taking address of temporary
I guess this improvement is the effect of your patch. So in effect the bug 
has been fixed and the report can remain closed, right?

Thanks again for having an open eye,

Wolfgang Bangerth             email:            bangerth@ticam.utexas.edu
                              www: http://www.ticam.utexas.edu/~bangerth/

More information about the Gcc-bugs mailing list