Coda File System

Re: gcc-3.2

From: Nix <nix_at_esperi.demon.co.uk>
Date: 01 Nov 2002 00:03:47 +0000
On Wed, 30 Oct 2002, Jan Harkes moaned:
> Similarily, allocation of persistent objects, it used to be the case
> that the range [&foo, &foo+sizeof(foo)] would contain all information
> associated with a C++ object. However the newer gcc's store miscelaneous
> data outside of that range, often even allocated off the heap so that
> when venus is restarted some of the required information is lost, with
> gcc-2.95 this already happens to f.i. any objects with virtual
> functions.

The C++ ABI requires that such things will happen for non-POD types, but
not for POD types; so avoid virtual functions, constructors,
destructors, and private and protected data and you should be fine.

(You might have to avoid throwing exceptions out of those functions,
too, but since you're trying to avoid exceptions completely that
shouldn't be too hard. :) )

> The exception handling code conflicts with the userspace thread package.
> So we have to compile with -fno-exceptions, but this is obviously not
> tested well as gcc-3.x still seems to insist on adding exception
> handlers in some places.

That's definitely a bug. If you stick a report into GNATS I'll try to
fix it (probably for 3.3, as 3.2.1 is too imminent to fix it there).

-- 
`The library at my secondary school was there for punishment, I think. I
 did liberate a number of books because I felt sorry for them.'
   --- Marna Gilligan
Received on 2002-10-31 19:32:25