This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug Found!



The following is a nice and annoying bug:
For "gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)"

Compiling C++:

g++ -g -fno-exceptions -fno-rtti -fno-check-new -Wall -pedantic -W
-Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long -fno-builtin


template <class T>
class TemplateClass
{
	// ...
};

class TheClass
{
	// ...
	TemplateClass<TheClass*> templateClass;
};

It complains that on the line "class TheClass",  TheClass has been redefined
and that it's already defined at the template instantiation.

I've never tested this on any other compiler, but, either way, it doesn't seem
right.  That's like saying you can't keep a pointer to yourself...

Many Thanks

-Charles

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]