🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

A Bug-Report - what else...

#1167
From: Michael Baentsch
Date: Wed, 23 Dec 1992 09:06
96 lines
3242 bytes
Hello (whatever you might be :-),
   I happened to find a bug within gcc-2.3.2, which is really only
the compiler's disability to point to a missing declaration:

   The following happened:

   .ProcessG.cc: In function `class Genotype* make_ProcessG_exemplar ()':
   .ProcessG.cc:98: Internal compiler error.
   .ProcessG.cc:98: Please report this to `bug-g++@prep.ai.mit.edu'.

, when I tried to compile '.ProcessG.h' (which I can send you on request
in its full length); this is an code extract from the crucial places:

The Header-File:
----------------
class Exemplar;
class Genotype {
	public:
		Genotype(char*, Boolean, char*);
		Genotype(Exemplar);
		virtual Genotype* make(char*, Boolean);
		virtual ~Genotype();
		char    *type() { return classname; };
	private:
		char    *savefile;
		char    *classname;
		Boolean save_me;
		Base    *proxy;
};

extern Genotype* processGenotype;
Genotype* make_ProcessG_exemplar();

class ProcessG : public Genotype {
	friend class Process;
	public:
******		ProcessG(Exemplar); <-- formerly missing declaration
		ProcessG(char*, Boolean, char*);
		Genotype        *make(char*, Boolean);
	private:
		int     test;
};

--------------------------------------------
The Body:
---------
Genotype* processGenotype;

Genotype* make_ProcessG_exemplar() {
	processGenotype = new ProcessG(Exemplar()); <-- crucial line
	return processGenotype;
}

/////////////////////////////

ProcessG::ProcessG(
	Exemplar        a
):Genotype(a)
{
}

...


^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

   These are the essential sources, that produced the error:
'g++' always finished to work with the above mentioned message, when it
tried to compile the 'crucial line' (see above).
   At the time the error occured, I had forgotten to enter the
'*****'-line and thus, I had not declared the constructor 
'ProcessG(Exemplar)' (although I had defined it in the '.cc'-File)

   The problem is - as far as I can judge it - that the compiler
wasn't able to detect that no contructor of the above mentioned form
has been declared; it would have been much more easy to detect my
fault (the missing declaration) if the compiler had found the mistake,
so I think it is something which should be corrected in later releases
of this really good compiler.

   After this quite long message, I'd like to wish anybody reading
this stuff a Merry Christmas and a Happy New Year (in case you are 
still working ;-)

Michael

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

Michael Baentsch		baentsch@informatik.uni-kl.de
AG Systemsoftware
University of Kaiserslautern

Bahnhofstr. 37			06894/51350
D-6670 St.Ingbert-Rb.

---------------------------------------------------------------
Technical Details
Message-ID: <9212231006.aa00624@sokrates.informatik.uni-kl.de>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!informatik.uni-kl.DE!baentsch

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!informatik.uni-kl.DE!baentsch
From: baentsch@informatik.uni-kl.DE (Michael Baentsch)
Subject: A Bug-Report - what else...
Message-ID: <9212231006.aa00624@sokrates.informatik.uni-kl.de>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Wed, 23 Dec 1992 09:06:15 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 97