[comp.lang.ada] 11.6 at work

Mendal@SIERRA.STANFORD.EDU.UUCP (04/11/87)

Dear Ada Fans-

Concerning the Constraint_Error on the program which has the
0 .. 100 range....

Although I do not have trusty Language Maintenance Committee notes
in front of me, I seem to recall on several occasions that Robert
Dewar and Robert Eachus have stated that according to the ARM, 11.6,
an implementation can "optimize" a portion of a program if its only
"effect" is to cause the raising of a predefined exception.  (I hope
I have not misrepresented Dewar or Eachus here.)

Taken in the context in which the original program appeared, the only
"effect" of the program would be to raise Constraint_Error.  By the
rules granted in 11.6, a clever code generator could simply eliminate
the assignment altogether.

I recall the DEC and Verdix compilers doing such things.

Any comments?

  -- gom
-------