From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!attcan!uunet!husc6!cs.utexas.edu!fred From: fred@cs.utexas.edu (Fred Hosch) Newsgroups: comp.lang.ada Subject: Re: is this a bug of my Ada compiler Message-ID: <3577@cs.utexas.edu> Date: 13 Oct 88 20:02:52 GMT References: <243@cui.UUCP> <7324@aw.sei.cmu.edu> Organization: U. Texas CS Dept., Austin, Texas List-Id: In article <7324@aw.sei.cmu.edu>, firth@sei.cmu.edu (Robert Firth) writes: > Since the constant K is never subsequently used, the compiler > has probably optimised your code and deleted both K and the > initial assignment to it. That is legitimate [RM 11.6 (7)], > but I confess I'd rather have had a compile-time warning. > It's not clear to me that LRM 11.6(7) permits the compiler to optimize away the declaration elaboration. If K were a variable subsequently assigned, the "predefined operation" of assignment "need not be invoked." I think a CONSTRAINT_ERROR or NUMERIC_ERROR is required to be raised in this case? ---fred hosch fred@cs.utexas.edu