This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GC changes
- To: Mike Stump <mrs at windriver dot com>
- Subject: Re: GC changes
- From: Jamie Lokier <egcs at tantalophile dot demon dot co dot uk>
- Date: Mon, 15 Jan 2001 10:04:42 +0100
- Cc: amylaar at cambridge dot redhat dot com, gcc at gcc dot gnu dot org, geoffk at geoffk dot org, tej at melbpc dot org dot au
- References: <200101150255.SAA03643@kankakee.wrs.com>
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