🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

gcc 2.2.2 & stdarg.h problems

#13
From: dragana
Date: Fri, 30 Oct 1992 16:21
105 lines
2744 bytes
We are using gcc version 2.2.2 and libg++-2.2 on a SUN Sparc (SunOS R 4.1.1).

Here's the problem:
-------------------------------------------------------------------------
g++ 2.2.2 seems to have a bug when using stdarg.h. I defined a virtual 
method in a Base class (which is itself a subclass of another class) 
and redefined the method in a subclass of this class and the subclass
of the subclass, resulting in the following tree

		class::virtual method( int n, ... );
		 \
		  \
		   subclass::method( int n, ... );
		    \
		     \
		     subsubclass::method( int n, ... );

In all three classes Symbols having Names like LBB81, LBB82, LBB83, ...
LBC61, LBC63, ... LBD181, LBD184 .. etc (about 60 ones) are generated
by the compiler. They are undefined in the resulting object files.
Because they are defined nowhere else, the following linkage of the 
objects into a executable failed. 
Below is a listing of the output from the linking phase.
A small test program that uses stdlib.h in a single class gave no errors
and no such symbols at all.

rm -f form.exe
g++ -o form.exe form.o -O -static -L../../../../lib  -L../../../../src/xgt/lib -ltheseus++ -lXgt    
Undefined
LBE50
LBB50
LBE40
LBB40
LBE41
LBB41
LBE31
LBB31
LBE42
LBB42
LBE32
LBB32
LBE43
LBB43
LBE33
LBB33
LBE44
LBB44
LBE34
LBB34
LBE45
LBB45
LBE35
LBB35
LBE46
LBB46
LBE36
LBB36
LBE47
LBB47
LBE37
LBB37
LBE48
LBB48
LBE38
LBB38
LBE49
LBB49
LBE39
LBB39
LBE30
LBB30
LBE20
LBB20
LBE21
LBB21
LBE22
LBB22
LBE23
LBB23
LBE24
LBB24
LBE25
LBB25
LBE26
LBB26
LBE27
LBB27
LBE28
LBB28
LBE29
LBB29
collect: /usr/bin/ld returned 2 exit status
*** Error code 1
make: Fatal error: Command failed for target `form.exe'
----------------------------------------------------------------------

Thanks
         Dragana

 +---------------------------------------------------------------------------+
 |   Dragana Likavec               GRIS, Technical University Darmstadt      |
 |                                 Wilhelminenstrasse 7                      | 
 |   dragana@igd.fhg.de            6100 Darmstadt, FRG                       |
 |                                 Tel:+49+6151-155166                       |
 +---------------------------------------------------------------------------+
Technical Details
Message-ID: <9210301421.AA06598@malta.grz>
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!igd.fhg.DE!dragana

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!igd.fhg.DE!dragana
From: dragana@igd.fhg.DE
Subject: gcc 2.2.2 & stdarg.h problems
Message-ID: <9210301421.AA06598@malta.grz>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Fri, 30 Oct 1992 16:21:11 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 106