This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
standard-conforming.

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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]