From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26346 invoked by alias); 9 Jul 2002 00:06:04 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 26300 invoked by uid 71); 9 Jul 2002 00:06:02 -0000 Date: Mon, 08 Jul 2002 17:06:00 -0000 Message-ID: <20020709000602.26297.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: "Giovanni Bajo" Subject: Re: c++/5931: ICE when using template class that is child if another template class Reply-To: "Giovanni Bajo" X-SW-Source: 2002-07/txt/msg00253.txt.bz2 List-Id: The following reply was made to PR c++/5931; it has been noted by GNATS. From: "Giovanni Bajo" To: , , , , Cc: Subject: Re: c++/5931: ICE when using template class that is child if another template class Date: Tue, 9 Jul 2002 01:56:47 +0200 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p r=5931 Notice that the code is not legal C++. The snippet reported by Reichelt is: ------------------------snip here------------------------ template struct A { template class SubA {}; }; template struct B : public A::SubA {}; B b; ------------------------snip here------------------------ which is not legal C++, because it's accessing a nested template without the explicit template keyword. The correct version: ------------------------snip here------------------------ template struct B : public A::template SubA {}; ------------------------snip here------------------------ which correctly compiles on my GCC 3.1. So the PR type should be changed to ice-on-illegal-code. This should also solve the reporter's compilation problems. Giovanni Bajo P.S: I'm not subscibed to any GCC list, so please include my adress in CC list if needed.