Path: utzoo!attcan!uunet!husc6!uwvax!oddjob!ncar!noao!nud!mcdchg!clyde!wayback!arny
From: arny@wayback.UUCP (Arny B. Engelson)
Newsgroups: comp.lang.ada
Subject: Re: Conditional compilation
Summary: Be careful, LRM 10.6 not required
Message-ID: <1369@wayback.UUCP>
Date: 23 Jun 88 13:01:33 GMT
References: <909*haug@vax.runit.unit.uninett> <28254@clyde.ATT.COM>
Organization: AT&T Bell Labs, Whippany, NJ
Lines: 23

In article <28254@clyde.ATT.COM>, rds@moss.ATT.COM writes:
> 
> On the issue of conditional compilations in Ada...
> 
> Our Ada requirements would be well suited by a conditional compilation
> but our application must be portable. My interpretation of LRM 10.6(2)
> is since the compiler omits code not referenced the programmer can
> omit code by conditionally (not) referencing it and setting static
> conditions for evaluation at compile time. 
 
LRM 10.6 is insufficient for conditional compilation because it is not
REQUIRED that an implementation check for code that will never be executed
and eliminate the corresponding object code.  It (the LRM) only says that
it is permissible to do this as part of optimization.  Some compilers may
do it, some may not, and some may do it only if (the equivalent of)
/optimize is used.

This is an (optional) optimization step, not a standardized way of
providing conditional compilation.  Personally, I think the "pragma"
solution for conditional compilation works well, and would like to see
it standardized and provided with all implementations.  Comments?

  - Arny Engelson