From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30524 invoked by alias); 13 Apr 2005 22:04:25 -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 30503 invoked by uid 48); 13 Apr 2005 22:04:16 -0000 Date: Wed, 13 Apr 2005 22:04:00 -0000 Message-ID: <20050413220416.30502.qmail@sourceware.org> From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050413215022.21008.nicoara@roguewave.com> References: <20050413215022.21008.nicoara@roguewave.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/21008] [3.4/4.0/4.1 Regression] Acess failure in accessing data member of base class from derived template class X-Bugzilla-Reason: CC X-SW-Source: 2005-04/txt/msg01820.txt.bz2 List-Id: ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-13 22:04 ------- Ok, I don't know if this is valid code (I think it is invalid as foo_ is qualified and not dependent, even though ICC and Comeau does not reject this): struct A { int foo_; }; template struct B : public A {}; template<> struct B {}; template struct C : B { int foo () { return A::foo_; } }; Take the above code and add: C a; void f(void) {a.foo();} ICC only rejects the code at instantiation time which seems wrong. Someone else will have to comment to make sure that I got my analysis right. The way to "fix" the if the code is invalid is to do B::A::_foo or this->_foo. -- What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid Summary|Acess failure in accessing |[3.4/4.0/4.1 Regression] |data member of base class |Acess failure in accessing |from derived template class |data member of base class | |from derived template class Target Milestone|--- |3.4.4 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21008