From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1940 invoked by alias); 13 Jun 2014 03:30:47 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 1896 invoked by uid 48); 13 Jun 2014 03:30:38 -0000 From: "potswa at mac dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/61492] New: Nested-name-specifier lookup finds function Date: Fri, 13 Jun 2014 03:30:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: potswa at mac dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-06/txt/msg01148.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D61492 Bug ID: 61492 Summary: Nested-name-specifier lookup finds function Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: potswa at mac dot com Name lookup of a nested-name-specifier should only find entities with associated scopes: namespaces, classes, and enumerators. GCC allows a funct= ion name to hide an enumerator. (Classes and namespaces are correctly not hidde= n.) enum e { m }; e e(), q =3D e::m; // Error: =E2=80=98e=E2=80=99 is not a class, namespace,= or enumeration >>From gcc-bugs-return-454067-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jun 13 03:36:57 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 3996 invoked by alias); 13 Jun 2014 03:36:55 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 3950 invoked by uid 48); 13 Jun 2014 03:36:43 -0000 From: "potswa at mac dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/61492] Nested-name-specifier lookup finds function Date: Fri, 13 Jun 2014 03:36:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: potswa at mac dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-06/txt/msg01149.txt.bz2 Content-length: 352 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61492 --- Comment #1 from David Krauss --- Oops, objects hide enumerations in this context too. enum e { m } e = e::m; // Same error I neglected to check this because I thought I'd used it a while ago, but it turns out I'd worked around the problem. Clang accepts the examples.