From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5433 invoked by alias); 30 Mar 2005 14:56:39 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 5316 invoked by alias); 30 Mar 2005 14:56:29 -0000 Date: Wed, 30 Mar 2005 14:56:00 -0000 Message-ID: <20050330145629.5315.qmail@sourceware.org> From: "jozef at syncad dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050329171354.20687.jozef@syncad.com> References: <20050329171354.20687.jozef@syncad.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/20687] namespace bug X-Bugzilla-Reason: CC X-SW-Source: 2005-03/txt/msg03445.txt.bz2 List-Id: ------- Additional Comments From jozef at syncad dot com 2005-03-30 14:56 ------- Subject: Re: namespace bug Hi, This is not about the same : 7.3.4.5 d1++; // shows that there is a conflict between a symbol in your // namespace and a symbol imported using using namespace f(1); // shows that there is a conflict between two symbols; // both imported from two namespaces; one directly, // the second transitively None of the errors indicated show that there is a conflict between a symbol imported from a namespace and a symbol from a higher level namespace. But the example in the first paragraph clearly states that the imported names hide names from the higher levels: 7.3.4.1 i = 5; // OK, C::i visible in B and hides A::i 7.3.4.5 does not conflict with 7.3.4.1. It still looks to me reasonable that the names imported using namespace have higher precedence than names inherited from a higher level namespace (this would be similar to the fact that the names defined in a namespace have higher precedence to the names inherited from a higher level namespaces). One more argument is that this feature is required to compile correctly STLport. pinskia at gcc dot gnu dot org wrote: > ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-29 19:51 ------- > The reduced testcase: > namespace dd { > struct t1 {}; > } > namespace ff { > using namespace dd; > } > struct t1 { }; > namespace ff > { > typedef t1 t2; > } > > > But the use of t1 is ambiguous really as "using namespace" is not as strong as defining the t1 in the > namespace ff or doing a "using dd::t1" in the namespace ff. > Can you provide some reference to the standard for this claim, please? Regards, Jozef -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20687