🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by bothner Mon, 11 Sep 1989 02:46
More problems with g++.xtar
#407
Author: 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads