[Bug c++/62116] Allowing redeclaration of global variable x using ::x
yaghmour.shafik at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Aug 13 15:29:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62116
--- Comment #2 from Shafik Yaghmour <yaghmour.shafik at gmail dot com> ---
I am happy to be mistaken here, but it seems like section 6.8 paragraph 1
applies, for example if we have the following:
int(y) = 10;
it is being treated as a declaration not a cast and further more section 6.8
comments on an ill-formed example and says:
This is of course ill-formed for semantic reasons, but that does not affect the
syntactic analysis.
so even though:
int(::x);
would be ill-formed we are forced to treat it as a declaration and not a
function style cast.
More information about the Gcc-bugs
mailing list