Subject: Re: HPFF-F90 and Conditional Compilation

From: Harvey Richardson <[email-masked]>
Date: Sat, 5 Dec 92 15:50:14 EST

> Conditional compilation is not included in any programming language standard
> because it necessarily transcends language issues.  The very existence of a
> compiler is not part of the definition of a programming language, and
> specifying the mannner in which the compilation is to depend on some aspects
> of an environment that cannot be part of the language is a hopeless task. 

As you say there is a difference between conditional compilation defined as
part of a language standard and a standardisation of a programming
environment which can conditionaly provide source lines for compilation.

However did not the ANSI C comittee take the latter course and define the 
behaviour of the C preprocessor?

From what I remember there was an approach to the F90 commitee to
ask for the ANSI definition of cpp to be included,  they voted against
it on that basis that it was outside their scope.

Perhaps someone can remember exactly what happened.

Harvey Richardson
Customer Support Group
Thinking Machines Corporation

---

From: Bob Knighten <[email-masked]>
Date: Sun, 6 Dec 92 12:14:38 PST

Harvey Richardson writes:
  > . . .
Yes and no.  ANSI C certainly defines the linguistic aspects of the C
preprocessor, but not its interaction with the programming environment.
The conditional compilation features of C are useful primarily when various
preprocesor constants can be defined in the external environment or on the
command line of the compiler.  This is what is not specified.  The
specification of #include similiarly does not specify the form of file names
exactly because that cannot be part of the language specification.  

So, there are many ways to get conditional compilation including the hack of
expecting compilers to ignore code that is part of an IF clause that can be
recognized at compile time to never be take, but none of these provides a
standard, portable way of specifying conditional compilation.

-- Bob

Robert L. Knighten	             | [email-masked]
Intel Supercomputer Systems Division | 
15201 N.W. Greenbrier Pkwy.	     | (503) 629-4315
Beaverton, Oregon  97006	     | (503) 629-9147 [FAX]