From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 351 invoked by alias); 2 Feb 2004 21:13:05 -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 335 invoked by alias); 2 Feb 2004 21:13:05 -0000 Date: Mon, 02 Feb 2004 21:13:00 -0000 Message-ID: <20040202211305.334.qmail@sources.redhat.com> From: "gdr at integrable-solutions dot net" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040201233401.13967.gianni@mariani.ws> References: <20040201233401.13967.gianni@mariani.ws> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/13967] A warning could be emitted if a template parameter of a member template is begin shadowed by another member of the class X-Bugzilla-Reason: CC X-SW-Source: 2004-02/txt/msg00225.txt.bz2 List-Id: ------- Additional Comments From gdr at integrable-solutions dot net 2004-02-02 21:13 ------- Subject: Re: A warning could be emitted if a template parameter of a member template is begin shadowed by another member of the class "gcc-bugs at michaelmellor dot com" writes: | ------- Additional Comments From gcc-bugs at michaelmellor dot com 2004-02-02 20:44 ------- | Gabriel Dos Reis writes: | |Well, I don't think GCC is in error. When you define a function (or a | |class) in a class, it gets rewritten as if it where defined outside of | |the class (which is why we get the reevaluation rule I pointed you to | |in a different PR). Now, when you reevaluate the member template | |outside of the class, name lookup is required to find X::C -- see | |14.6.1/5 and 14.6.1/7 | | 14.6.1/5 and 14.6.1/7 refer to "In the definition of a member of a class | template..." and "In the definition of a class template or in the definition | of a member of such a template..." respectively. The example does not have a | class template, it is a member-template. That is the answer from the Core Group. As I said, the decision of having class members hide template parameters was an explicit decision made by the committee. Parameters of member templates are no different. | So AFAICS GCC is wrong. No, GCC is not wrong. I just checked with the Core group and John Spicer said yes, the program is ill-formed. -- Gaby -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13967