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++/59921] New: Variable names should be ignored when qualified name lookup is applied to nested name specifier


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


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