🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

More problems with g++.xtar

#407
From: bothner
Date: Mon, 11 Sep 1989 02:46
30 lines
1314 bytes
I finally persevered in compiling and linking libg++ with
my application. However:

* In function convert_to_aggr in cplus_cvt.c:1073 cp->harshness
is alloca'd an array of 2 shorts. Then compute_conversion_costs
(in cplus-class.c) is invoked with arglen=2. However, the latter
routine assumes that cp->harshness is (arglen+1) length - just
look at the call to bzero.

Not really understanding much of the code, I changed cplus_cvt.c:1073
to alloca an array of 3 shorts. That seems to work.

* Compiling libg++ still crashes, if optimization is on.
I removed -O -fstrength-reduce from the libg++/src/Makefile,
and the library compiled to completion.

* I needed to call a C++ routine from C. I tried adding
a declaration of the form:

extern "C" {
  struct Any foo(etc);
};

struct Any foo(etc)
{
}

However, the extern seemed to have no effect - foo still gets
a munged name. (I managed to kludge around it.)
	--Per
Technical Details
Message-ID: <8909110246.AA02450@gilroy.pa.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!WSL.DEC.COM!bothner

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!WSL.DEC.COM!bothner
From: bothner@WSL.DEC.COM
Newsgroups: gnu.g++.bug
Subject: More problems with g++.xtar
Message-ID: <8909110246.AA02450@gilroy.pa.dec.com>
Date: 11 Sep 89 02:46:08 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 30