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]

[Bug c++/62116] Allowing redeclaration of global variable x using ::x


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.


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