HDTenEightyP/NetNews huggingface dataset:
From: Peter.Schauer@regent.e-technik.tu-muenchen.dbp.DE (Peter Schauer)
Subject: Severe problem with gcc-2.3.[23], conversions and assignment operators
Organization: GNUs Not Usenet
Distribution: gnu
Date: Mon, 4 Jan 1993 00:29:48 GMT

The following program causes gcc-2.3.[23] to go into an infinite loop
on all platforms till virtual memory is exhausted.
If the assignment operator function is removed, it compiles ok.
If the copy constructor is removed and the assignment operator is kept,
the following warning is issued:
crashme.C: In function `void  crashme ()':
crashme.C: too many arguments for constructor `V'

gcc-2.3.1 and earlier compiles ok in all cases.

class M;
class V
{
public:
	V ();
	V (const V&);
	V& operator = (const V&);
};
class M
{
public:
	M ();
	operator V ();
	M some_func (void);
};
void
crashme (void)
{
	V v;
	M m;

	v = m.some_func();
}

-- 
Peter Schauer			pes@regent.e-technik.tu-muenchen.de

Newsgroups: gnu.g++.bug
From: jbuck@ohm.berkeley.edu (Joe Buck)
Subject: Keep sending those bug reports!  Ignore jaf@inference.COM
Organization: U. C. Berkeley
Distribution: gnu
Date: Mon, 21 Dec 1992 00:06:24 GMT

In article <9212191854.AA27840@cana> jaf@inference.COM writes:
>A significant number of people receive their mail via UUCP over phone
>lines.  I consider myself very fortunate to have a relatively high speed
>phone link; it only took 13 minutes to download your posting at average
>800 chars/sec.  However, I wonder how certain people felt when it took
>anywhere from 30 minutes to 2 HOURS to download your bug report.

First, you should apologize to the person you flamed, since he did exactly
the right thing.  Second, if it inconveniences you to get gnu.g++.bug
you should unsubscribe.  This group is the mailing list for g++
maintainers; it happens to be provided as a newsgroup as well, but this
is only a convenience for those that wish to read it that way.  Since
the maintainers have specifically asked people to send bug reports in
full, and not to compress or encode them, and since I haven't seen you
generate a single bug fix, it is clear that you should not be listened
to, as there is no benefit for g++ users in making things more convenient
for you.



-- 
Joe Buck	jbuck@ohm.berkeley.edu

Newsgroups: gnu.g++.bug
From: yb@lri.FR
Subject: gcc2.3.3 failure with const and template
Organization: GNUs Not Usenet
Distribution: gnu
Date: Tue, 29 Dec 1992 18:06:47 GMT

gcc2.3.3 gives incorrect error messages when calling a private constant method
from a public method in a template class.

Here is the source code and gcc diagnostics :
---------- file unallowed-private-call-in-template.cc ---------------------
template <class T> class A {
public:
        void foo ();
private:
        void bar () const;
};

template <class T> void A<T> :: foo () { bar(); }
template <class T> void A<T> :: bar () const {}

A<int> a;
----------------------------------------------------------------------------
% gcc -v
Reading specs from /usr/local/gnu/lib/gcc-lib/hp700-hpux/2.3.3/specs
gcc version 2.3.3
% gcc -c unallowed-private-call-in-template.cc
unallowed-private-call-in-template.cc: In method `void  A<int>::foo ()':
unallowed-private-call-in-template.cc:9: the method void  A<int>::bar ()const  is private
unallowed-private-call-in-template.cc:8: within this context

The bug disappears when I remove "private" or "const".

- Yves Berteaud  (yb@lri.lri.fr)

Newsgroups: gnu.g++.bug
From: krste@icsi.berkeley.edu (Krste Asanovic)
Subject: same bug
Organization: GNUs Not Usenet
Distribution: gnu
Date: Mon, 28 Dec 1992 18:36:25 GMT

This still didn't get fixed in 2.3.3. (works in 2.2.2).

On a Sparcstation-2 running SunOS 4.1.1.

Krste Asanovic,                   Computer Science Division, 
email: krste@cs.berkeley.edu      c/o 571 Evans Hall
phone: +1 (510) 642-4274 ext 143  University of California at Berkeley
fax:   +1 (510) 643-7684          CA 94720, USA

session transcript:
--------------------------------------------------------------------
icsib43:20Nov92>cat main.cc
template<class T>
class Vec
{
public:
    Vec(int nElements);
    ~Vec();

    int size();

protected:
    int n;
    T *p;
};

template<class T>
inline
Vec<T>::Vec(int nElements)
  : n(nElements)
{
    p = new T[nElements];
}

template<class T>
inline
Vec<T>::~Vec()
{
    delete[] p;
}

template<class T>
inline int
Vec<T>::size()
{
    return n;
}

main()
{
    Vec<int> a(3);

    return 0;
}
icsib43:20Nov92>gcc -v -c main.cc
Reading specs from /usr/local/lib/gcc/sun4/2.3.3/specs
gcc version 2.3.3
 /usr/local/lib/gcc/sun4/2.3.3/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 main.cc /tmp/cca05883.i
GNU CPP version 2.3.3 (sparc)
 /usr/local/lib/gcc/sun4/2.3.3/cc1plus /tmp/cca05883.i -quiet -dumpbase main.cc -version -o /tmp/cca05883.s
GNU C++ version 2.3.3 (sparc) compiled by GNU C version 2.3.3.
main.cc: In function `int  main ()':
main.cc:13: inconsistent return types for method `Vec' in class `Vec<int>'
main.cc: In method `Vec<int>::~Vec ()':
main.cc:28: Internal compiler error.
main.cc:28: Please report this to `bug-g++@prep.ai.mit.edu'.
icsib43:20Nov92>


Newsgroups: gnu.g++.bug
From: max@ise.fhg.de (Max Kubierschky)
Subject: (none)
Organization: GNUs Not Usenet
Distribution: gnu
Date: Tue, 22 Dec 1992 19:34:56 GMT

g++ produces incorrect code compiling:
------------------------ cut here -------------------------
#include <iostream.h>

class A
{
  public:
	A( int j ) { i=j; }
	int i;
};

class B
{
  public:
	B() {}
	B( const A& a, const A& ) { cout << a.i << endl; }
	B operator+( const B& ) { return *this; }
};

B b( B() + B(1,2) );

main() {}
------------------------ cut here -------------------------
When I execute the produced program, I get: 
2
Whereas my idea of correct code is something producing:
1

###output from  `g++ -v t.C', with t.C being the listed program:
Reading specs from /usr/local/gnu/lib/gcc-lib/m68k-hp-hpux/2.2.2/specs
gcc version 2.2.2
 /usr/local/gnu/lib/gcc-lib/m68k-hp-hpux/2.2.2/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dhp9000s200 -Dhp9000s300 -DPWB -Dhpux -Dunix -D__hp9000s300 -D__hp9000s200 -D__PWB -D__hpux -D__unix -D__hp9000s200__ -D__hp9000s300__ -D__PWB__ -D__hpux__ -D__unix__ -D__hp9000s300 -D__hp9000s200 -D__PWB -D__hpux -D__unix -D__hp9000s200 -D__hp9000s300 -D__PWB -D__hpux -D__unix -D__hp9000s300 -D__hp9000s200 -D__PWB -D__hpux -D__unix -D__HAVE_68881__ -Dmc68020 -D_HPUX_SOURCE -D__HPUX_ASM__ t.C /us
r/tmp/cca10862.i
GNU CPP version 2.2.2 (68k, SGS/hpux syntax)
 /usr/local/gnu/lib/gcc-lib/m68k-hp-hpux/2.2.2/cc1plus /usr/tmp/cca10862.i -quiet -dumpbase t.cc -version -o /usr/tmp/cca10862.s
GNU C++ version 2.2.2 (68k, SGS/hpux syntax) compiled by CC.
 as -o t.o /usr/tmp/cca10862.s
 /usr/local/gnu/lib/gcc-lib/m68k-hp-hpux/2.2.2/ld /lib/crt0.o -L /usr/local/gnu/lib/gcc-lib/m68k-hp-hpux/2.2.2 -L /usr/local/gnu/lib t.o -lg++ /usr/local/gnu/lib/gcc-lib/m68k-hp-hpux/2.2.2/libgcc.a -lc /usr/local/gnu/lib/gcc-lib/m68k-hp-hpux/2.2.2/libgcc.a

###output from `uname -a':
HP-UX server1 B.08.00 B 9000/385 0800091148c7

###output from `ll /usr/gnu/src/gcc-2.2.2/tm.h /usr/gnu/src/gcc-2.2.2/md':
lrwxr-xr-x   1 gnu      other         16 Jul 21 11:07 /usr/gnu/src/gcc-2.2.2/md -> ./config/m68k.md
lrwxr-xr-x   1 gnu      other         16 Jul 21 11:07 /usr/gnu/src/gcc-2.2.2/tm.h -> ./config/hp320.h

Max
From: umrigar@bingsuns.cc.binghamton.edu (Zerksis D. Umrigar)
Newsgroups: gnu.g++.bug
Subject: g++ bug
Date: 27 Dec 92 20:41:17 GMT
Distribution: gnu
Organization: GNUs Not Usenet

/*

The following fails to compile under a unmodified gcc 2.3.2
(mips-dec-ultrix4.2).  It compiles if the marked (enum) line below is
removed and the values for N and D directly substituted in the return
expression for f.  The compilation log is shown after the program.


*/

class X {
  class S {
    int m;
  public:
    S(int i) : m(i) { }
    int f(void) {
      enum {N= 8, D= 10 };	//Problem.
      return (m*N)/D;
    }
  };
  S s;
public:
  X(int i) : s(i) { }
  int f(void) { return s.f(); }
};

/* COMPILATION LOG.

gcc -c t2.cc
t2.cc: In method `int  S::f ()':
t2.cc:17: Internal compiler error 12.
t2.cc:17: Please report this to `bug-g++@prep.ai.mit.edu'.

Compilation exited abnormally with code 1 at Sun Dec 27 15:25:33

-zerksis umrigar (umrigar@bingsuns.cc.binghamton.edu).

*/
Newsgroups: gnu.g++.bug
From: mrs@cygnus.com (Mike Stump)
Subject: Re:  [joost@ori.cadlab.de: seg-fault on contradicting prototypes, C++ & extern "C"]
Organization: GNUs Not Usenet
Distribution: gnu
Date: Mon, 21 Dec 1992 21:57:25 GMT

This problem has been fixed, and should not exist in the next release of gcc.

> From: Michael Joosten <joost@ori.cadlab.de>
> Date: Wed, 1 Apr 92 21:22:03 +0200
> To: bug-gcc@prep.ai.mit.edu
> Reply-To: joost@cadlab.uni-paderborn.de

> Machine: sparc-sun-sunos41

> Compiled with: -O

> Version of cc1plus:
> >cc1plus -version
> GNU C++ version 2.1 (sparc) compiled by GNU C version 2.1.
> enabled: -fdefer-pop -fpeephole -ffunction-cse -fcommon -fgnu-linker
>          -mfpu -mepilogue

> Input File:
> > cat T.i

> int strcmp();

> extern "C" {
> int strcmp(const char*, const char*);
> }

> Arguments: cc1plus T.i

> Symptoms: Immediate Segmentation Violation. This also occurs in 2.0 and on
> sun3 (m68k-sun-sunos41).

> Gdb-4.4 says:
> (Sorry, no debugging info, it was way too large...)

> Program terminated with signal 11, Segmentation fault.
> Reading symbols from /usr/lib/libc.so.1.6...done.
> #0  0x32dc0 in common_type (t1=0x1800c0, t2=0x17fee8) at ../gcc-2.1/cp-typeck.c:312
> #1  0x32998 in commonparms (p1=0x180ad8, p2=0x17ff88) at ../gcc-2.1/cp-typeck.c:220
> #2  0x330f4 in common_type (t1=0x180af0, t2=0x180d60) at ../gcc-2.1/cp-typeck.c:378
> #3  0x1627c in duplicate_decls (newdecl=0x1947d8, olddecl=0x183030)
>     at ../gcc-2.1/cp-decl.c:2056
> #4  0x16fdc in pushdecl (x=0x1947d8) at ../gcc-2.1/cp-decl.c:2364
> #5  0x1d788 in start_decl (declarator=0x1787c8, declspecs=0x175548, initialized=0, 
>     raises=0x0) at ../gcc-2.1/cp-decl.c:4693
> #6  0xe360 in yyparse ()
> #7  0x87c64 in output_file_directive ()
> #8  0x8a74c in main ()

> The crash is here in cp-typecheck:common_type()

>     case POINTER_TYPE:
>     case REFERENCE_TYPE:
>       /* For two pointers, do this recursively on the target type,
> 	 and combine the qualifiers of the two types' targets.  */
>       {
> =>	tree target = common_type (TYPE_MAIN_VARIANT (TREE_TYPE (t1)),
> 				   TYPE_MAIN_VARIANT (TREE_TYPE (t2)));
> 	int constp

> Seems that the compare of the '()'  paramlist in t2 with the (const char*,
> const char*) hasn't checked 'comptypes' ?

> Hope that this little buggy is really easily reproducible 8-)

>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | Michael Joosten   |       Tel.  : (+49) (+) 5251-284 120                 |
> | CADLAB            |       Fax   : (+49) (+) 5251-284 140                 |
> | Bahnhofstr. 32    |       E-Mail: joost@cadlab.de                        |
> | D-4790 Paderborn  |        	    ...!uunet!unido!cadlab!joost           | 
> | FRG               | Mass mail to: joost@pbinfo.uni-paderborn.de          |
> |--------------------------------------------------------------------------|
> | CADLAB is a cooperation between Uni-GH Paderborn & SNI AG                |
>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Newsgroups: gnu.g++.bug
From: ezk@shekel.cs.columbia.edu (Erez "HWank1" Zadok)
Subject: internal compiler error in gcc/g++ 2.3.3
Organization: GNUs Not Usenet
Distribution: gnu
Date: Mon, 28 Dec 1992 18:46:32 GMT

This is the same problem that existed in 2.3.2 which I have reported.
Provided are two short programs that cause an internal compiler error in g++
2.3.3.  The problem goes away if I comment out the second instantiation of
bar_t in test2.cc...

Our configuration is a Sun-4/630 running SunOS 4.1.2.  I've rebuilt gcc
2.3.3 and libg++ 2.3 with gcc-2.3.3 and had no problems during the build or
installation.

Erez Zadok.
Central Research Facilities.
Columbia University Department of Computer Science.
---
"A wank's morning starts one jiffy    | Arpa:   ezk@cs.columbia.edu
 after midnight."                     | Usenet: ...!rutgers!columbia!cs!ezk
 -HebrewWank #1 (US meaning, not UK!) | Bitnet: erzus@cuvmb.BITNET

==============================================================================
$ cat test1.cc
#include <GetOpt.h>
#include <String.h>
class foo {public: foo () {}};
class bar {public: bar (foo& dflt);};
class baz: public bar {public: baz (): bar (foo ()) {}};
$ g++ -v -c test1.cc
Reading specs from /usr/local/gnu/lib/gcc-lib/sun4/2.3.3/specs
gcc version 2.3.3
 /usr/local/gnu/lib/gcc-lib/sun4/2.3.3/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 test1.cc /tmp/cca25754.i
GNU CPP version 2.3.3 (sparc)
 /usr/local/gnu/lib/gcc-lib/sun4/2.3.3/cc1plus /tmp/cca25754.i -quiet -dumpbase test1.cc -version -o /tmp/cca25754.s
GNU C++ version 2.3.3 (sparc) compiled by GNU C version 2.3.3.
test1.cc: In method `baz::baz ()':
test1.cc:5: Internal compiler error.
test1.cc:5: Please report this to `bug-g++@prep.ai.mit.edu'.
$ cat test2.cc
#include <GetOpt.h>
class foo_t {public: foo_t() {}};
class bar_t {public: bar_t(foo_t &s=foo_t()) {}};
int main() {bar_t my_bar; bar_t your_bar;}
$ g++ -v -c test2.cc
Reading specs from /usr/local/gnu/lib/gcc-lib/sun4/2.3.3/specs
gcc version 2.3.3
 /usr/local/gnu/lib/gcc-lib/sun4/2.3.3/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 test2.cc /tmp/cca25770.i
GNU CPP version 2.3.3 (sparc)
 /usr/local/gnu/lib/gcc-lib/sun4/2.3.3/cc1plus /tmp/cca25770.i -quiet -dumpbase test2.cc -version -o /tmp/cca25770.s
GNU C++ version 2.3.3 (sparc) compiled by GNU C version 2.3.3.
test2.cc: In function `int  main ()':
test2.cc:4: Internal compiler error.
test2.cc:4: Please report this to `bug-g++@prep.ai.mit.edu'.
==============================================================================


Newsgroups: gnu.g++.bug
From: rheiger@renext.eiger.olivetti.CH (Richard H. E. Eiger)
Subject: Re: DWARF -g still broken ... cc1plus dies
Reply-To: rheiger@renext.eiger.olivetti.ch
Organization: Olivetti (Schweiz) AG, Branch Office Berne
Distribution: gnu
Date: Sun, 3 Jan 1993 10:24:51 GMT

In article <9301010111.AA15912@life.ai.mit.edu> shap@halifax.syncomas.com  
writes:
> When compiling libg++ using any g++ 2.0 or later, targeting DWARF object
> format, with -g enabled, the resulting .s files do not assemble.
> The assembler diagnostics complain about a variety of missing jump target
> labels.
> 
> The specific configuration I am seeing this under is:
> 
> 	g++ 2.3.3
> 	libg++ 2.3
> 
> both configured with:
> 
> 	configure i386v4
> 
> I am aware that the library can be built without -g.
> 
[deleted]
> Thanks for your help.
> 
> 
> Jonathan S. Shapiro
> Synergistic Computing Associates
> shap@halifax.syncomas.com

I have observed the same behabiour. The first problem I encountered, however,  
was that cc1plus "died" on signal 6 when compiling .../streamio/iomanip.C.  
Without -g option it compiles just fine. But in order to link it is necessary  
to compile everything without -g. Maybe I should have tried to compile with a  
different debug format.

--
                         
    ___           _____2
   /   )  /  /   /        Richard H. E. Eiger
  /_ _/  /__/   /__       Ing. Informatik HTL
 /\     /  /   /          Unregistered NeXT fan
/  \   /  /   /_____      rheiger@renext.eiger.olivetti.ch (NeXT mail welcome)
From: dir@lookout.IT.USwc.USwest.COM (Daniel I. Rosenblatt)
Newsgroups: gnu.g++.bug
Subject: Problem building InterViews 3.0.1 w gcc-2.3.2 and libg++-2.3
Date: 22 Dec 92 02:25:44 GMT
Distribution: gnu
Organization: GNUs Not Usenet

This is on a Sun Sparc w/SunOS 4.1.2 - standard configuration.
The package is InterViews 3.0.1 with the GNU patches.

I get undefined symbol __vt$7istream$3ios when attempting to link
several sample InterViews programs (ibuild, iclass).

The reference to this is in src/lib/Unidraw/catalog.c .

The closest definition in libg++.a is in iostream.o:'D __vt$istream$3ios'.

My guess is that somehow the name mangleing was inconsistent.

Any suggestions?

Dan Rosenblatt
dir@lookout.uswest.com
Newsgroups: gnu.g++.bug
From: mj@dfv.rwth-aachen.DE (Martin Junius)
Subject: g++ 2.3.3: copy constructor bug still there
Organization: Communication Networks
Distribution: gnu
Date: Tue, 29 Dec 1992 16:07:40 GMT

This bug is still present in g++ 2.3.3:

----bug-copy.C----------------------------------------------------------------
#include <iostream.h>

class X;

class Y
{
public:
    Y()           { /* cout << "Y::Y()\n"; */   }
    Y(const X &x) { cout << "Y::Y(const X&)\n"; }
    Y(const Y &y) { cout << "Y::Y(const Y&)\n"; }
};

class X: public Y
{
public:
    X()          { /*cout << "X::X()\n";*/         }
// Uncommenting the following line will enforce the correct behaviour
//  X(const X&x) { cout << "X::X(const X&)\n"; }
    X(const Y&y) { cout << "X::X(const Y&)\n"; }
    X getit() { cout << "X::getit()\n"; X x; return x; }
};

main()
{
    X a, b;
    
    a = b.getit();
}
----Compile--------------------------------------------------------------------------
Reading specs from /usr/global/lib/gcc-lib/sparc/2.3.3/specs
gcc version 2.3.3
 /usr/global/lib/gcc-lib/sparc/2.3.3/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 bug-copy.C /usr/tmp/cca24241.i
GNU CPP version 2.3.3 (sparc)
 /usr/global/lib/gcc-lib/sparc/2.3.3/cc1plus /usr/tmp/cca24241.i -quiet -dumpbase bug-copy.cc -version -o /usr/tmp/cca24241.s
GNU C++ version 2.3.3 (sparc) compiled by GNU C version 2.3.3.
 as -o /usr/tmp/cca242411.o /usr/tmp/cca24241.s
 /usr/global/lib/gcc-lib/sparc/2.3.3/ld -e start -dc -dp /lib/crt0.o -L/usr/global/lib/gcc-lib/sparc/2.3.3 -L/usr/global/lib /usr/tmp/cca242411.o -lg++ -lgcc -lc -lgcc
----Run-----------------------------------------------------------------------
X::getit()
X::X(const Y&)      <-- This is wrong!!!
Y::Y(const Y&)
----Output should be (cfront 2.1)---------------------------------------------
X::getit()
Y::Y(const Y&)
------------------------------------------------------------------------------

g++ 2.3.3 doesn't generate a default copy constructor, but makes 
strange detours if a constructor with an argument for which an 
implicit type conversion exists is declared. This can be as worse 
as casting the class thru an int!

This still is one of the major problems of compiling NIHCL 3.x 
with GNU C++.

Martin
-- 
 _____ _____
|     |___  |   Martin Junius           FIDO:      2:242/6.1
| | | |   | |   Communication Networks  Internet:  mj@dfv.rwth-aachen.de
|_|_|_|@work|   Aachen U of Technology  Phone:     ++49-241-8790220 (voice)

Newsgroups: gnu.g++.bug
From: dougm@cs.rice.edu (Doug Moore)
Subject: 2.3.3: template/operator- bug
Organization: GNUs Not Usenet
Distribution: gnu
Date: Mon, 28 Dec 1992 08:01:12 GMT

In the following program, I find that a friend binary operator - and a
member operator - w/ no args cannot co-exist in the same template class;
the result of an attempt is a link error.

Note that if the member minus without args is replaced by a friend
minus with one arg, the problem disappears.

First the compiler:  gcc 2.3.3, original sources, on a sparc (sunos
4.1.2).

The compiler output:
==============================================================================
g++ -v -Wall bug.cc
Reading specs from /blossom/lib/gcc-lib/sun4/2.3.3/specs
gcc version 2.3.3
 /blossom/lib/gcc-lib/sun4/2.3.3/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 -Wall bug.cc /usr/tmp/cca05901.i
GNU CPP version 2.3.3 (sparc)
 /blossom/lib/gcc-lib/sun4/2.3.3/cc1plus /usr/tmp/cca05901.i -quiet -dumpbase bug.cc -Wall -version -o /usr/tmp/cca05901.s
GNU C++ version 2.3.3 (sparc) compiled by GNU C version 2.3.3.
 as -o /usr/tmp/cca059011.o /usr/tmp/cca05901.s
 /blossom/lib/gcc-lib/sun4/2.3.3/ld -e start -dc -dp /lib/crt0.o -L/blossom/lib/gcc-lib/sun4/2.3.3 -L/blossom/lib /usr/tmp/cca059011.o -lg++ -lgcc -lc -lgcc
ld: Undefined symbol 
   ___mi__FRCt6Number1ZiT0 
collect: /usr/bin/ld returned 2 exit status
==============================================================================

The source:
==============================================================================
template<class T>
class Number
{
public:
friend Number operator- (const Number& src1, const Number& src2);
  Number operator- () const;
  T data;
};

template <class T>
inline Number<T>
operator- (const Number<T>& src1, const Number<T>& src2)
{
  Number<T> dst;
  dst.data = src1.data - src2.data;
  return dst;
}

main()
{
  Number<int> a, b, c;
  b.data = 1;
  c.data = 2;
  a = b - c;
}
==============================================================================

Doug Moore
(dougm@cs.rice.edu)
From: umrigar@bingsuns.cc.binghamton.edu (Zerksis D. Umrigar)
Newsgroups: gnu.g++.bug
Subject: g++ bug
Date: 27 Dec 92 20:39:50 GMT
Distribution: gnu
Organization: GNUs Not Usenet

/* 

The following fails to compile under a unmodified gcc 2.3.2
(mips-dec-ultrix4.2).  It compiles if the marked (enum) line below is
commented out, or the enum initializer is changed to a sizeof(void *).  The
compilation log is shown after the program.

*/

class X {
  struct X1;
  enum { A= sizeof(X1 *) };	//Causes a problem.
  struct X1 { int i; };
  X1 *f(X1 *);
public:  
  X(void);
};

X::X1 *X::f(X1 *x) {
  return x;
}

/* COMPILATION LOG
gcc -c t2.cc
t2.cc:19: argument list for `f' does not match any in class
t2.cc: In method `struct X::X1* X::f (struct X::X1*)':
t2.cc:20: type `X1' is not a base type for type `X1'
t2.cc:21: warning: control reaches end of non-void function

Compilation exited abnormally with code 1 at Sun Dec 27 11:59:14

-zerksis umrigar (umrigar@bingsuns.cc.binghamton.edu).

*/
Newsgroups: gnu.g++.bug
From: cbt@hobbes.inesc.pt (Conceicao Batista Tavares)
Newsgroups: gnu.g++.bug
Subject: static member of a template
Date: 22 Dec 92 12:34:52 GMT
Distribution: gnu
Organization: INESC, Lisboa Portugal

When I try to compile the following program I get an error,
and I don't know if it is g++ bug. I think that sintax it's OK.

Does anyone knows what is happening?

Exemple-----------------------------------------

template<class T> class A {
 static int a;
}

template<class T> int A<T>::a;

main() {
}

-------------------------------------------------

And the error is:--------------------------------

sorry, not implemented: non-function templates not yet supported

-------------------------------------------------

Thanks

SAO
--
<> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> 
<> Programs don't |        Sao Tavares                         <>        
<> run, just walk |   E-mail: cbt@yosemite.inesc.pt            <>      
<> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <>
Newsgroups: gnu.g++.bug