🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #1085

Re: g++ 2.2.1 template bug (2)

#1085
From: Mike Stump
Date: Fri, 06 Nov 1992 08:28
43 lines
1993 bytes
This problem has been fixed, and should not exist in the next release of gcc.

> Message-Id: <9206121504.AA01165@joker>
> From: stefan@mpi-sb.mpg.de
> To: bug-gcc@prep.ai.mit.edu
> Date: Fri, 12 Jun 92 17:04:20 +0200
> Organization: Universitaet des Saarlandes
>               D-W-6600 Saarbruecken, Germany

> // g++-2.2.1: member functions returning a template type 

> template <class T> struct list { };

> struct A
> {
>   list<int> L;

>   list<int>  get_list();

> };


> list<int> A::get_list() { return L; }


> /*

> OUTPUT:

> Reading specs from /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.2.1/specs
> gcc version 2.2.1
>  /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.2.1/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix template2.c /usr/tmp/cca16493.i
> GNU CPP version 2.2.1 (sparc)
>  /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.2.1/cc1plus /usr/tmp/cca16493.i -quiet -dumpbase template2.cc -version -o /usr/tmp/cca16493.s
> GNU C++ version 2.2.1 (sparc) compiled by GNU C version 2.2.1.
> template2.c:17: semicolon missing after declaration of `list<int>'
> template2.c: In method `int  A::get_list (struct A*)':
> template2.c:17: conflicting types for `int  A::get_list (struct A*)'
> template2.c:12: previous declaration of `struct list<int> A::get_list ()'
> template2.c: In method `struct list<int> A::get_list ()':
> template2.c:17: aggregate value used where an integer was expected

> */
Technical Details
Message-ID: <9211060828.AA01426@cygnus.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!emory!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cygnus.com!mrs

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!emory!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cygnus.com!mrs
From: mrs@cygnus.com (Mike Stump)
Newsgroups: gnu.g++.bug
Subject: Re:  g++ 2.2.1 template bug (2)
Message-ID: <9211060828.AA01426@cygnus.com>
Date: 6 Nov 92 08:28:00 GMT
Article-I.D.: cygnus.9211060828.AA01426
Sender: gnulists@ai.mit.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 43
Approved: bug-g++@prep.ai.mit.edu