This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Internal Compiler Error + Question
- To: gcc-bugs <gcc-bugs at gcc dot gnu dot org>
- Subject: Internal Compiler Error + Question
- From: Philippe A. Bouchard <philippeb at videotron dot ca>
- Date: Sat, 2 Dec 2000 17:05:48 -0500
The following program:
struct B
{
};
//struct B B;
template <int S = 1024> struct A
{
struct B;
};
template <int S> struct A<S>::B : public ::B
{
};
int main()
{
A<> a;
}
Generates:
bugsigaction.cpp:13: Internal compiler error.
bugsigaction.cpp:13: Please submit a full bug report.
bugsigaction.cpp:13: See <URL:http://www.gnu.org/software/gcc/bugs.html> for
instructions.
Under:
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.2/specs
gcc version 2.95.2 20000220 (Debian GNU/Linux)
Question:
If the variable 'struct B B' is defined, the compiler will think that 'struct
A<>::B : public ::B' tries to inherit form a variable. Is this supposed to be
that way in Standard C++? If so, is there a way to tell the compiler that we
are trying to use the type B and not an instanciation? ('struct A<>::B :
public struct ::B' does not work)
Please reply to:
philippeb@corel.com
Thank you.