This is the mail archive of the
mailing list for the GCC project.
Re: Handling non-constant bounds in extract_range_from_cond
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: laurent at guerby dot net
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 29 Nov 04 18:20:50 EST
- Subject: Re: Handling non-constant bounds in extract_range_from_cond
May be it's from Ada 83 code, it's exactly to safely (in the
presence of more aggressive optimizers) replace this
kind of code that 'Valid was added to Ada 95.
Yes, I know all that, Robert's response to the customer was basically a
tutorial on this issue to the customer, and he was satisfied.
But still ...
I don't mind the compiler being friendler for "X in Foo" (but then I
assume some users may complain about performance so you'll have to add
a switch to restore the more formal standard behaviour)
I don't follow. Treating "X in Foo" as X'Valid is perfectly
My point is that when the programmer wrote "X in Foo", he really meant
X'Valid. It's true that the programmer is "uneducated" and what he wrote
was not valid Ada and it's safe to compile it as if it were simply "True",
but why go out of our way to do that when we know perfectly well what the
programmer meant and that wasn't it?