[Bug c++/37213] Declaration/expression ambiguity resolution does not extend beyond initializer
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Dec 27 14:37:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37213
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2010.12.27 14:36:50
Ever Confirmed|0 |1
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-12-27 14:36:50 UTC ---
(In reply to comment #0)
> typedef S* (*FuncType)(int,int);
> int x,y;
> S* a() {
> FuncType(a)(x,y)->z = 0; // treated as declaration
calling 'a' through a function pointer of a different type is undefined
behaviour, but fixing that doesn't change the error, which I agree is wrong.
More information about the Gcc-bugs
mailing list