This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/59921] New: Variable names should be ignored when qualified name lookup is applied to nested name specifier
- From: "kariya_mitsuru at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 23 Jan 2014 15:40:18 +0000
- Subject: [Bug c++/59921] New: Variable names should be ignored when qualified name lookup is applied to nested name specifier
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59921
Bug ID: 59921
Summary: Variable names should be ignored when qualified name
lookup is applied to nested name specifier
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: kariya_mitsuru at hotmail dot com
The sample code below should be compiled successfully but g++ reports an error.
int A = 1;
enum A {
x = 2,
};
int main()
{
return A::x;
}
According to C++11 standard 3.4.3 [basic.lookup.qual] paragraph 1, The variable
name "A" should be ignored.
gcc versions and error messages:
http://melpon.org/wandbox/permlink/tPZK53MNWXsmfw2x