[gnu.g++.bug] More problems with g++.xtar

bothner@WSL.DEC.COM (09/11/89)

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