This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/3656: ICE when incorrectly deriving a class from a templated base in another namespace
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/3656: ICE when incorrectly deriving a class from a templated base in another namespace
- From: gjkaiser at intrinsic dot com
- Date: 12 Jul 2001 02:48:10 -0000
- Reply-To: gjkaiser at intrinsic dot com
>Number: 3656
>Category: c++
>Synopsis: ICE when incorrectly deriving a class from a templated base in another namespace
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: ice-on-illegal-code
>Submitter-Id: net
>Arrival-Date: Wed Jul 11 19:56:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: gjkaiser@intrinsic.com
>Release: egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
>Organization:
>Environment:
i386-redhat-linux
>Description:
Deriving a class from a templated base in another namespace,
but forgetting to instance the template to serve as the
base, generates an ICE. Workaround is to use an instance of
the template as the base class, as C++ requires.
The given test case, while giving an ICE in the compiler
version listed, compiles without any error with
CodeSourcery's Online Test Compilation. That is incorrect
as well, as the code is illegal C++.
>How-To-Repeat:
Compile the following:
namespace Space { template <class T> class base { }; }
class child : public Space::base { };
>Fix:
I don't know of a fix, but the fix may be the same as for
Bug 3123, which looks to be similar to this one. I don't
know the compiler code to know if this report is redundant
with 3123.
>Release-Note:
>Audit-Trail:
>Unformatted: