From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24223 invoked by alias); 22 Apr 2014 22:27:24 -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 24189 invoked by uid 48); 22 Apr 2014 22:27:19 -0000 From: "mbos at google dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60927] Ambiguity not caught when name introduced through using-directive conflicts with previously declared entity Date: Tue, 22 Apr 2014 22:27: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: unknown X-Bugzilla-Keywords: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: mbos at google 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: cc 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-04/txt/msg01646.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60927 Maurice Bos changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mbos at google dot com --- Comment #1 from Maurice Bos --- Some interesting related test cases: namespace N { struct A {}; } namespace A {} using namespace N; A * x; int main() {} G++ correctly complains about ambiguity. When the two lines with 'N' are removed, it complains that A is not a type. (As expected.) Very similar test case: #include namespace N { struct A {}; } namespace A {} using namespace N; std::unique_ptr x; // Only this line is different. int main() {} G++ does not complain about ambiguity, but gives the same error as when the two lines with 'N' are removed.