This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Need advice on bounds checking approaches
- To: Greg McGary <gkm at eng dot ascend dot com>
- Subject: Re: Need advice on bounds checking approaches
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 10 Apr 2000 10:04:00 -0600
- cc: Joern Rennecke <amylaar at cygnus dot co dot uk>, gcc at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <mszor3unld.fsf@tucson-net-82.eng.ascend.com>you write:
> > > (Should I somehow mark conditional traps as being generated
> > > automatically by bounds checking, and only optimize those away, or
> > > should I just document the as yet undocumented __builtin_trap as
> > > subject to this optimization?)
> > I don't think so.
>
> There are two questions here. Which one are you answering?
> (a) only optimize away redundant trap_if associate with BPs?
> (b) optimize away all redundant trap_if, and document that behavior
> for __builtin_trap? (incidentally, __builtin_trap is undocumented)
I think we should always remove redundant trap_ifs that we find, regardless
of whether they're created by bounded-pointers or some other mechanism.
Documenting this behavior (along with __builtin_trap) would be wise.
jeff