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

Reply via email to