GC changes

Jamie Lokier egcs@tantalophile.demon.co.uk
Mon Jan 15 01:05:00 GMT 2001


Mike Stump wrote:
> > That is not safe.  You can't predict what kind of address arithmetic
> > the compiler will make.  For example, strength reduction could cause
> > a pointer to be pointing into the middle of an array, or worse,
> > somewhere beyond it (incorporating some constant adjustments).
> 
> We already need a switch to disable GC unfriendly optimizations.

Or two -- some GCs can handle interior pointers but some cannot.

Perhaps GC-safety should be a type attribute, rather than a
compile time flag.

-- Jamie


More information about the Gcc mailing list