HDTenEightyP/NetNews huggingface dataset:
From: Karsten.Pahnke@inf-technik.tu-ilmenau.DE (Karsten Pahnke)
Newsgroups: gnu.g++.bug
Subject: operator++
Date: 21 Jan 1993 18:07:53 -0500
Organization: GNUs Not Usenet
Distribution: gnu

Hallo gnu--developers,

I have two problems with the g++2.3.3:

1.) The compiler does not distinct pre- and postfix versions
    of increment and decrement operators. 
    I think this is a difference to the ARM.

Here a small example:
----------------cut here--------------------------------------------------
#include <iostream.h>

class Integer {
private:
	int _val;
public:
	Integer(int val = 0) {_val = val;}

	int	operator++()	{ _val++; return _val; }
	int	operator++(int)	{ int temp = _val; _val++; return temp; }
	operator int() const	{ return _val; }
};

main()
{
	Integer i(5);
	cout << "i  : " << i << endl;
	cout << "i++: 5 5 6 ok" << endl;
	cout << "i++: " << i << ' ' << i++ << ' ' << i << endl;
	cout << "++i: 6 7 7 ok" << endl;
	cout << "++i: " << i << ' ' << ++i << ' ' << i << endl;
}

----------------cut here--------------------------------------------------
the executable produces the following output:
i  : 5
i++: 5 5 6 ok
i++: 5 6 6
++i: 6 7 7 ok
++i: 6 7 7

the third line shows the problem: gnu ever takes the prefix implementation





2.) The compiler produces an internal error message, if I try to
    use a template class as a member in another class (and there was no
    prior instance of the same template class).
    The cfront has no problems with it. 
    Is it because its additional instantiation pass?

Here is a sample out of a bigger library, where this error occur.
The work around was the external declared dummy of the template.


-------------------------------cut here-----------------------------
class Iterator;

#include <base/generic/tslist.hpp>

#ifdef __GNUG__
extern	TSList<Iterator*> temp_dummy_iter_list;
	// this is a hack
	// to avoid internal Compiler error
#endif


class Collect {
friend class Iterator;
	DECLARE_MEMBERS(Collect);
protected:
	//--- DATA MEMBER ----------------------------------------
	TSList<Iterator*> _active_iter;	// active iterators 
					// on collection
public:

...

};
-------------------------------cut here-----------------------------

Without the additional extern deklaration I got the message:

collect.cc:577: Internal compiler error.
collect.cc:577: Please report this to `bug-g++@prep.ai.mit.edu'.

during compilation of the corresponding source file.
(This is the last line of collect.cc)

The proposed hack seems to avoid this problem.



PS: Sorry. My english is terrible. No flames please.
-- 

 -------------------------------------------------------------
| Dipl.-Ing. Karsten Pahnke       | Telefon : 0037 672 691167 | 
| Technische Universitaet Ilmenau |           0037 672 691168 |       
| PSF 327, O-6300 Ilmenau         | Telefax : 0037 672 691517 | 
|-------------------------------------------------------------| 
| E-Mail : Pahnke@Inf-Technik.TU-Ilmenau.DE                   |
 -------------------------------------------------------------
From: kol@world.std.com (Nikolay Yatsenko)
Newsgroups: gnu.g++.bug
Subject: g++ bug
Date: 28 Jan 1993 22:14:07 -0500
Organization: Gnus Not Usenet
Distribution: gnu

g++ (gcc 2.3.3, sparc) failed on this file with internal compiler error.

/////////////////// Input file /////////////////////////////////////////
//
struct B {
	int b;
	virtual int f() {return 0;}
	};

struct C {int c;};

struct E : C {};

struct B1 : virtual B {};
struct B2 : virtual B1{};
struct B4 : C, B1 {};

struct D3 : E , B4, B2 { int f() {return 3;} };

int main(void)
{
  D3 d;         // Internal compiler error 211 here.

  return 0;
}
///////////////// end of input file ////////////////////////////////

Reading specs from /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/specs
gcc version 2.3.3
 /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/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 multbaseb2.C /usr/tmp/cca27108.i
GNU CPP version 2.3.3 (sparc)
 /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/cc1plus /usr/tmp/cca27108.i -quiet -dumpbase multbaseb2.cc -version -o /usr/tmp/cca27108.s
GNU C++ version 2.3.3 (sparc) compiled by GNU C version 2.3.3.
multbaseb2.C: In function `int  main ()':
multbaseb2.C:20: warning: internal consistency check failed, please report, recovering.
multbaseb2.C:20: cannot convert a pointer of type `D3'
multbaseb2.C:20: to a pointer of type `B1'
multbaseb2.C:20: Internal compiler error 211.
multbaseb2.C:20: Please report this to `bug-g++@prep.ai.mit.edu'.
From: mc@vicorp.COM (Mark Charalambous)
Newsgroups: gnu.g++.bug
Subject: "Hands On Learning" (C++) compiler error
Date: 25 Jan 1993 21:06:08 -0500
Organization: GNUs Not Usenet
Distribution: gnu

Hello

I'm working on the exercises in Volume 5 of "C++ Object-Oriented Programming"
and had the following problem.

(Section 2)
I copied the code for ex2.c from the Answers directory and received the
following errors, including the internal compiler error which requests
that you be informed:

avatar% make ex2
g++   -target sun4 -c -o string.o string.c
ar rv libpre_wind.a string.o
a - string.o
ar: creating libpre_wind.a
rm -f string.o
g++   -target sun4 -c -o point.o point.c
ar rv libpre_wind.a point.o
a - point.o
rm -f point.o
touch Display_med.h
g++   -target sun4 -c -o display_med.o display_med.c
display_med.c: In method `void  Display_medium::add_line (const class Point&, co
nst class Point&, long unsigned int)':
display_med.c:26: warning: implicit declaration of function `abs'
ar rv libpre_wind.a display_med.o
a - display_med.o
rm -f display_med.o
touch Screen.h
g++   -target sun4 -c -o screen.o screen.c
In file included from screen.c:2:
Screen.h:36: warning: class `Screen' has virtual functions but non-virtual destr
uctor
screen.c: In method `class Point Screen::size ()const ':
screen.c:20: Internal compiler error.
screen.c:20: Please report this to `bug-g++@prep.ai.mit.edu'.
*** Error code 1
make: Fatal error: Command failed for target `libpre_wind.a(screen.o)'

Thanks in advance
Mark Charalambous
mc@vicorp.com
413-586-4144
From: schwab@lamothe.informatik.uni-dortmund.de (Andreas Schwab)
Newsgroups: gnu.g++.bug
Subject: G++ 2.3.3: inconsistent name mangling
Date: 26 Jan 1993 22:01:55 -0500
Organization: GNUs Not Usenet
Distribution: gnu
Reply-To: schwab@ls5.informatik.uni-dortmund.de (Andreas Schwab)

The virtual table of struct B gets different names depending on the
presence of the forward declaration of struct B in this situation:

struct B;
struct x
{
  friend struct B;
};
struct A { virtual ~A (); };
struct B : virtual A {};

If the forward declaration is present, the following names are
generated:

00000000 t gcc2_compiled.
00000000 t __$_1B
00000060 d __vt$1B$1A
         U __$_1A
         U ___builtin_delete

When the first line is deleted, the following names are generated:

00000000 t gcc2_compiled.
00000000 t __$_1B
00000060 d __vt$B$1A
         U __$_1A
         U ___builtin_delete

When the friend declaration is deleted, the same names as in the first
case are generated, independent of the presence of the forward
declaration for struct B.

This situation occurs in libg++ 2.3 with class istream.
--
Andreas Schwab
schwab@ls5.informatik.uni-dortmund.de
From: kevin@traffic.den.mmc.com (Kevin Rodgers)
Newsgroups: gnu.g++.bug
Subject: Re: Internal Compiler error
Date: 22 Jan 1993 21:53:28 -0500
Organization: Martin Marietta Western Internal Systems, Technical Operations
Distribution: gnu

In article <199301211603.AA22131@mermaid.micro.umn.edu> draves@mermaid.micro.umn.edu (Christy Marie Draves) writes:
>The computer said Internal compiler error 307

We have a winner!
-- 
Kevin Rodgers				kevin@traffic.den.mmc.com
Martin Marietta MS A16401		(303) 790-3971
116 Inverness Dr. East
Englewood CO 80112 USA			GO BUFFS!
From: gparker@world.std.com (Glenn P Parker)
Newsgroups: gnu.g++.bug
Subject: gcc bug
Date: 25 Jan 1993 21:29:33 -0500
Organization: GNUs Not Usenet
Distribution: gnu
Reply-To: <gparker@world.std.com> (Glenn Parker)

Submitted on behalf of Nickolay Yatsenko at Software Emancipation
Technology, Inc., Waltham, MA.

Reading specs from /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/specs
gcc version 2.3.3
 /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/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 exp_t_c.C /usr/tmp/cca25889.i
GNU CPP version 2.3.3 (sparc)
 /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/cc1plus /usr/tmp/cca25889.i -quiet -dumpbase exp_t_c.cc -version -o /usr/tmp/cca25889.s
GNU C++ version 2.3.3 (sparc) compiled by GNU C version 2.3.3.
exp_t_c.C: In function `int  main ()':
exp_t_c.C:9: cannot cast null list to type `int'

// From ARM 5.2.3:
// "A simple-type-name followed by a pair of parentheses
//  constructs a value of specified type."

int main(void)
{
  int i = int();  // g++ 2.3.3 cannot compile it.

  return 0;
}
From: kol@world.std.com (Nikolay Yatsenko)
Newsgroups: gnu.g++.bug
Subject: g++ bug
Date: 28 Jan 1993 22:14:28 -0500
Organization: Gnus Not Usenet
Distribution: gnu

Compile error (gcc 2.3.3, sparc), inline function in nested class.
Below is an example:
input source file, gcc 2.3.3 compiler messages.


/////////////////// Input file /////////////////////////////////////////
// ARM 9.7 Nested Class Declaration.
//
// From AT&T Annotated C++ Reference Manual, 9.7:
// "Except by using explicit pointers, references, and object names, 
// declarations in a nested class can use only type names, static members, 
// and enumerations from the enclosing class."
//
// This is an example from ARM $9.7. 

int x;

class enclose {
public:
  int x;
  static int s;

  class inner {
    void f(int i)
      {
	::x = i; // Error: g++ gives error, should be OK: assign to global x.
      }
  };
};
///////////////// end of input file ////////////////////////////////

Reading specs from /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/specs
gcc version 2.3.3
 /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/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 nested2.C /usr/tmp/cca26697.i
GNU CPP version 2.3.3 (sparc)
 /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/cc1plus /usr/tmp/cca26697.i -quiet -dumpbase nested2.cc -version -o /usr/tmp/cca26697.s
GNU C++ version 2.3.3 (sparc) compiled by GNU C version 2.3.3.
nested2.C:20: warning: all member functions in class `inner' are private
nested2.C: In method `void  inner::f (int)':
nested2.C:18: assignment to non-static member `x' of enclosing class `enclose'/
From: dak@tabaqui.informatik.rwth-aachen.de (David Kastrup)
Newsgroups: gnu.g++.bug
Subject: Re: gcc-2.3.3, option -dynamic quite spectacular
Date: 25 Jan 1993 20:31:00 -0500
Organization: Rechnerbetrieb Informatik - RWTH Aachen
Distribution: gnu

dak@tabaqui.informatik.rwth-aachen.de (David Kastrup) writes:

>The option is passed to all phases of the compiler, which feel compelled
>to treat it as some sort of debug option, and generate masses
>of debug files, and a process list. Quite funny.

The error might be in the man page I have (linux). Somebody wrote me
that the option is named -shared instead. No guarantee, however.
From: uli@intellektik.INformatik.TH-darmstadt.DE (Ulrich Grepel)
Newsgroups: gnu.g++.bug
Subject: Re: Undefined symbol error
Date: 21 Jan 1993 18:21:50 -0500
Organization: GNUs Not Usenet
Distribution: gnu

In article <9212291815.AA06057@hrt213.brooks.af.mil> you write:
|> 	I've been working on compiling RogueWave's Tools.h++ library
|> using g++; the lib compiled flawlessly under gcc 2.3.3, with libg++-2.3.
|> However, when linking a test program, I get the following:
|> 
|> ld: Undefined symbol 
|>    __vt$10ostrstream$3ios 
|> collect: /usr/bin/ld returned 2 exit status
|> *** Error code 1
|> 
|> 	I called RogueWave and confirmed it's not a symbol in their
|> library.  Tech support was able to confirm that they use calls to ios
|> which should be supplied by libg++, so it's something wrong with
|> libg++-2.3.  Anyone have any insight, or (hopefully) a fix?
|> 
|> -- Cerebus <tjm@hrt213.brooks.af.mil>
|> "Learning C++ as I go..."
|> 
|> 


We have almost the same problem here: We try to compile InterViews 3.1
and some of the larger programs fail due to

    __vt$7istream$3ios

missing. As far as we can guess this is a virtual function table for the
iostream-Library. The libg++-2.3-WHATSNEW file says that they changed
the inheritance structure of the iostream library. They now use multiple
inheritance with virtual base classes. If you look into iostream.h, you
can see that each of istream and ostream are declared as using ios as
it's virtual base class. So any other class inheriting both of istream
and ostream (like iostream) share a single copy of the ios object, and
not two, one for each of it's parents. Somehow I think the compiler
(gcc 2.3.3) can't cope with that concept and 'forgets' to put the virtual
function table for the ios functions of the istream class into the
appropriate object file that then finds its way into libg++.a. Anyhow,
unfortunately we do not have a solution, but we desperately need one.
If you got any reply with more help than ours, please mail 

alex@intellektik.informatik.th-darmstadt.de

AND

uli@intellektik.....

(not everyone of us is here at every time, and it's kind of urgent...)

Thanks,

Alex & Uli
From: hacrat@catfish.lcs.mit.edu (Nate Osgood)
Newsgroups: gnu.g++.bug
Subject: 2.3.3 Template Interface Change/Bug?
Date: 22 Jan 1993 21:26:22 -0500
Organization: MIT Laboratory for Computer Science
Distribution: gnu

Hi!  I'm a long-time user of g++ and of the g++ template system.  I was
quite surprised to find my template code responsible for many error
messages when I upgraded from gcc 2.2 to 2.3.3 (running on a Sun4
under SunOS 4.1.3).  I'm confident that the errors result from some
simple language spec change between the two versions of the compiler,
and I'm hoping to be able to modify my code accordingly.  I've
condensed the problem down to a minimal example.   

The problem concerns a report that there is no constructor present for
a template class in the visible scope.  It seems to occur when trying
to pass instances of the template class being complained about.
Here's the code:





template<class Contents> class A 
{
 public:
 A() {}
 A(A &t) {}
    
};


void    bar(A<int>);

int foo()
{
  A<int> foo;

  bar(foo);
 }



and here's the associatd compile

g++ -v /usr/tmp/foo.c
Reading specs from /usr/uns/lib/gcc-lib/sun4/2.3.3/specs
gcc version 2.3.3
 /usr/uns/lib/gcc-lib/sun4/2.3.3/cpp -lang-c++ -v -iprefix /usr/uns/lib/gcc-lib/sun4/2.2.2/sun4/2.3.3/ -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix /usr/tmp/foo.c /usr/tmp/cca13992.i
GNU CPP version 2.3.3 (sparc)
 /usr/uns/lib/gcc-lib/sun4/2.3.3/cc1plus /usr/tmp/cca13992.i -quiet -dumpbase foo.cc -version -o /usr/tmp/cca13992.s
GNU C++ version 2.3.3 (sparc) compiled by GNU C version 2.3.3.
/usr/tmp/foo.c: In function `int  foo ()':
/usr/tmp/foo.c:16: no constructor named `A' in visible scope
/usr/tmp/foo.c:17: warning: control reaches end of non-void function

Compilation exited abnormally with code 1 at Wed Jan 20 22:54:35


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


any ideas of what i'm missing?


thanks!

nate osgood
-- 
-------------------------------------------------------------------------------
Nate Osgood			| ARPA: hacrat@catfish.lcs.mit.edu
CS Graduate Student		| 
MIT LCS Room NE43-636		| UUCP: ...!uunet!catfish.lcs.mit.edu!hacrat
From: gparker@world.std.com (Glenn P Parker)
Newsgroups: gnu.g++.bug
Subject: gcc bug
Date: 25 Jan 1993 21:30:02 -0500
Organization: GNUs Not Usenet
Distribution: gnu
Reply-To: <gparker@world.std.com> (Glenn Parker)

Submitted on behalf of Nickolay Yatsenko at Software Emancipation
Technology, Inc., Waltham, MA.

Reading specs from /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/specs
gcc version 2.3.3
 /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/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 fn_call2.C /usr/tmp/cca25955.i
GNU CPP version 2.3.3 (sparc)
 /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/cc1plus /usr/tmp/cca25955.i -quiet -dumpbase fn_call2.cc -version -o /usr/tmp/cca25955.s
GNU C++ version 2.3.3 (sparc) compiled by GNU C version 2.3.3.
fn_call2.C: In function `int  main ()':
fn_call2.C:30: cannot declare references to functions; use pointer to function instead

// From ARM 5.2.2:
// Type `reference to function'.
//"A function call ... must be of type ... or `reference to function ...'"

int f() {  return 1; }

int main()
{
  int (&fr)() = f;  // g++ cannot compile it

  return 0;
}
From: pcm@cs.brown.edu (Peter C. McCluskey)
Newsgroups: gnu.g++.bug
Subject: Internal compiler error 346 (nested type destructor)
Date: 25 Jan 1993 20:41:54 -0500
Organization: GNUs Not Usenet
Distribution: gnu

class Neural_Net_Expression
{
  class History_Expression
  {
   public:
    History_Expression();
    virtual ~History_Expression();
  };
};

Neural_Net_Expression::History_Expression::~History_Expression()
{
}

no% /cs/bin/g++ -v -c t0.C
Reading specs from /cs/lib/gcc-lib/sun4/2.3.3/specs
gcc version 2.3.3
 /cs/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 t0.C /usr/tmp/cca12158.i
GNU CPP version 2.3.3 (sparc)
 /cs/lib/gcc-lib/sun4/2.3.3/cc1plus /usr/tmp/cca12158.i -quiet -dumpbase t0.cc -version -o /usr/tmp/cca12158.s
GNU C++ version 2.3.3 (sparc) compiled by GNU C version 2.3.3.
t0.C:13: Internal compiler error 346.
t0.C:13: Please report this to `bug-g++@prep.ai.mit.edu'.
From: hoelzle@xenon.stanford.edu (Urs Hoelzle)
Newsgroups: gnu.g++.bug
Subject: g++ 2.3.3 ignores 'extern "C"'
Date: 25 Jan 1993 21:18:54 -0500
Organization: CS Department, Stanford University, California, USA
Distribution: gnu

-------- x.c ---------------
# include <stdlib.h>
# include <malloc.h>

extern "C" void* malloc(int size) {  return 0; }
---------------------------

g++ -v -c x.c -o x.o ; nm x.o
Reading specs from /home/kahuna/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/specs
gcc version 2.3.3
 /home/kahuna/local/lib/gcc-lib/sparc-sun-sunos4.1/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 x.c /usr/tmp/cca26496.i
GNU CPP version 2.3.3 (sparc)
 /home/kahuna/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/cc1plus /usr/tmp/cca26496.i -quiet -dumpbase x.cc -version -o /usr/tmp/cca26496.s
GNU C++ version 2.3.3 (sparc) compiled by GNU C version 2.3.3.
 as -o x.o /usr/tmp/cca26496.s
00000000 T _malloc__Fv
00000000 t gcc2_compiled.


i.e. g++ generates a mangled name (_malloc__Fv) instead of _malloc.  If you
take out the inlcude of <malloc.h> it works.

g++ 2.2.2 already had problems with this ("program cc1plus got fatal
signal 11").

-Urs

----------------------------------------------------------------------------
Urs Hoelzle                                              urs@cs.stanford.EDU
Computer Systems Laboratory, CIS 57, Stanford University, Stanford, CA 94305
From: hacrat@catfish.lcs.mit.edu (Nate Osgood)
Newsgroups: gnu.g++.bug
Subject: Bug using "new" when compiling with -fthis-is-variable
Date: 25 Jan 1993 20:13:41 -0500
Organization: MIT Laboratory for Computer Science
Distribution: gnu

Hi!   I'm compiling using g++ 2.3.3  (running on a Sun4
under SunOS 4.1.3).  When I compile using the -fthis-is-variable flag,
the following simple code causes an internal compiler error.  here's
the code:

class foo
{
 public:
  foo(int);
};

main()
{
  foo *p;

  p = new foo(1);
}


and here's the error message:


catfish % g++ -fthis-is-variable foo.C         
foo.C: In function `int  main ()':
foo.C:11: Internal compiler error.
foo.C:11: Please report this to `bug-g++@prep.ai.mit.edu


thanks!

nate


-- 
-------------------------------------------------------------------------------
Nate Osgood			| ARPA: hacrat@catfish.lcs.mit.edu
CS Graduate Student		| 
MIT LCS Room NE43-636		| UUCP: ...!uunet!catfish.lcs.mit.edu!hacrat
From: joseph@iac.UUCP ( Joseph )
Newsgroups: gnu.g++.bug
Subject: gcc 2.2.2 pointer to another class member function bug.
Date: 26 Jan 1993 22:14:45 -0500
Organization: GNUs Not Usenet
Distribution: gnu

The following definition crashes gcc 2.2.2:

*******************************************

class Y;

class X {
public:
  typedef void (Y::*func)(void);
};

********************************************

g++  -v -c b6.cc
Reading specs from /lusr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/specs
gcc version 2.2.2
 /lusr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/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 b6.cc /tmp/cca18737.i
GNU CPP version 2.2.2 (sparc)
 /lusr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/cc1plus /tmp/cca18737.i -quiet -dumpbase b6.cc -version -o /tmp/cca18737.s
GNU C++ version 2.2.2 (sparc) compiled by GNU C version 2.2.2.
cp-decl.c:697: failed assertion `current_binding_level != global_binding_level'
/lusr/local/bin/gcc: Internal compiler error: program cc1plus got fatal signal 6

Compilation exited abnormally with code 1 at Tue Jan 26 08:32:04

-pepe
From: dlong@cse.ucsc.EDU (Dean R. E. Long)
Newsgroups: gnu.g++.bug
Subject: "trivial conversion" bug
Date: 25 Jan 1993 20:05:03 -0500
Organization: University of California, Santa Cruz (CE/CIS Boards)
Distribution: gnu

In this example, should not the trivial conversion (const T --> const T &)
be applied before the user-defined conversion?

--
arapaho /tmp [61] % cat a.c
#include <stream.h>

class A {
public:
    A(int)      {}
    operator const A & (void) const
    {
        cout << "Converted to (const A &) !\n";
        return *this;
    }
    operator == (const A &a) const
    {
        return 1;
    }
};

main()
{
    const A a = 0, b = 0;

    return a == b;
}
arapaho /tmp [62] % g++ -v a.c
Reading specs from /usr/local/gnu/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.3/specs
gcc version 2.3.3
 /usr/local/gnu/lib/gcc-lib/sparc-sun-sunos4.1.2/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 a.c /usr/tmp/cca19255.i
GNU CPP version 2.3.3 (sparc)
 /usr/local/gnu/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.3/cc1plus /usr/tmp/cca19255
.i -quiet -dumpbase a.cc -version -o /usr/tmp/cca19255.s
GNU C++ version 2.3.3 (sparc) compiled by GNU C version 2.3.3.
 as -o /usr/tmp/cca192551.o /usr/tmp/cca19255.s
 /usr/local/gnu/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.3/ld -e start -dc -dp /lib/
crt0.o -L/usr/local/gnu/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.3 -L/usr/local/gnu/
lib /usr/tmp/cca192551.o -lg++ -lgcc -lc -lgcc
arapaho /tmp [63] % a.out
Converted to (const A &) !
Converted to (const A &) !
Converted to (const A &) !
Converted to (const A &) !
Converted to (const A &) !
Converted to (const A &) !
Converted to (const A &) !
Converted to (const A &) !
Converted to (const A &) !
[repeated forever...]