Bug#118781: g++: g++: internal compiler error using nested templates
reassign 118781 g++-2.95
retitle 118781 [fixed in g++-3.0] internal compiler error using nested templates
tags 118781 + fixed
thanks
apenwarr@nit.ca writes:
> Package: g++
> Version: 2:2.95.4-8
> Severity: normal
>
> Hi,
>
> In trying to compile the following C++ program fragment using the command
> line
> g++ -c foo.cc
>
> I get the messages
>
> foo.cc:20: Internal compiler error.
> foo.cc:20: Please submit a full bug report.
> foo.cc:20: Internal compiler error:
> foo.cc:20: See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
>
> I believe the syntax to be correct. This is the simplest case I could find.
>
> Program code follows. Thanks,
>
> Avery
>
> ======snip=======
>
> template <class T>
> class Generic
> {
> public:
> T *obj;
>
> Generic(T &_obj) : obj(&_obj) { }
> };
>
> class Whatever
> {
> public:
> template <class T>
> class Gen2 : public Generic<T>
> {
> public:
> int x;
>
> Gen2() : Generic<T>(x) { }
> };
> };
>
> =========snip=========
--
To UNSUBSCRIBE, email to debian-gcc-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: