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 Lines: 15 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