comp.lang.ada
 help / color / mirror / Atom feed
From: brucej@hcx9.SSD.HARRIS.COM
Subject: Re: Conditional compilation
Date: 29 Jun 88 13:32:00 GMT	[thread overview]
Message-ID: <94700004@hcx9> (raw)
In-Reply-To: 28254@clyde.ATT.COM


djs@actnyc.UUCP states several objections to embedding conditional
compliation within an Ada compiler:

> I don't like the pragma approach as it is very hard to specify it within
> the bounds of pragma legality.  [RM references & explanation deleted]

> Additionally, a significant conditional compilation facility requires a
> meta-language of its own for definition and evaluation of conditions upon
> which to include text into a compilation or not. [more deletions]

> I am in favor of a distinct facility in the programming environment, like
> a preprocessor, for doing file inclusion, conditional compilation, and
> the like. Go ahead and standardize it, but don't force it into the Ada
> compiler. 

Here at Harris, we discovered a need for conditional compilation when
we first attempted to rehost and retarget the toolset we ship with our
Ada compiler.  Our approach was to create a preprocessor to perform 
that conditional compilation, and to implement code in the compiler
to automatically invoke the preprocessor as needed.  Ada source files
have a `.a' suffix,  while files in need of preprocessing have a `.pp'
suffix.  If the compiler's input file ends in `.pp' it first invokes
the preprocessor ("a.pp <foo.pp >foo.a"), and then compiles the `.a' file.

Preprocessing as a separate pass is cheap and efficient.  Invoking an
expensive global optimizer to perform this function is overkill.  Besides,
the optimizer has more than enough to do anyways.

While it would be presumptuous of me to propose that Harris' preprocessor
syntax be standardized,  I can at least point out the preprocessor's great 
value in allowing us to use a common set of source code for our Ada toolset 
for all of our different host/target combinations.  We found a.pp so useful
that we released it as part of our toolset.

----------
Bruce Jones 
brucej@hcx1.harris.com
Harris Computers, Fort Lauderdale, FL

  parent reply	other threads:[~1988-06-29 13:32 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1988-06-13  0:24 Conditional compilation Steinar Haug
1988-06-17 13:53 ` rds
1988-06-22  0:44   ` Jeff Bartlett
1988-06-23 13:01   ` Arny B. Engelson
1988-06-27 18:01     ` Dave Seward
1988-06-29 13:32   ` brucej [this message]
1988-06-17 14:48 ` rjs
  -- strict thread matches above, loose matches on Subject: below --
1989-12-12  0:08 conditional compilation Emery
2000-07-31  0:00 Matthew Woodcraft
2000-07-31  0:00 ` Marin D. Condic
2000-07-31  0:00   ` Ira D. Baxter
2000-08-01  0:00   ` Simon Brady
2000-07-31  0:00     ` Marin D. Condic
2000-08-01  0:00     ` Ted Dennison
2000-08-01  0:00       ` Robert A Duff
2000-08-01  0:00         ` Laurent Guerby
2000-08-02  0:00       ` Simon Brady
2000-08-02  0:00         ` Georg Bauhaus
2000-08-02  0:00         ` Robert A Duff
2000-08-02  0:00           ` Brian Rogoff
2000-08-03  0:00             ` Robert A Duff
2000-08-02  0:00           ` Georg Bauhaus
2000-08-03  0:00             ` Robert A Duff
2000-08-03  0:00           ` Florian Weimer
2000-08-02  0:00         ` Simon Brady
2000-08-01  0:00           ` William J. Thomas
2000-09-19  0:00 Conditional Compilation Kenneth Kueny
2000-09-19  0:00 ` Richard Riehle
2000-09-19  0:00 ` David Starner
2000-09-19  0:00 ` E. Robert Tisdale
2000-09-19  0:00   ` David Starner
2000-09-20  0:52     ` Robert Dewar
2000-09-19  0:00   ` Larry Kilgallen
2000-09-19  0:00     ` Jeff Allen
2000-09-20  0:49       ` Robert Dewar
2000-09-19  0:00         ` Bobby D. Bryant
2000-09-24  0:00           ` Robert Dewar
2000-09-20  0:47   ` Robert Dewar
2000-10-09  0:00   ` John McCabe
2000-09-19  0:00 ` Jeffrey Carter
2000-09-19  0:00   ` Samuel T. Harris
2000-09-20  0:44     ` Robert Dewar
2000-09-19  0:00 ` Ted Dennison
2000-09-20  1:33 ` tmoran
     [not found]   ` <8qauu3$7ei$1@nnrp1.deja.com>
2000-09-24  0:00     ` Robert Dewar
2000-09-25  2:45       ` Ted Dennison
2000-09-25  0:00         ` peter
     [not found] ` <39CA31F2.E160F0D8@res.raytheon.com>
2000-09-24  0:00   ` Robert Dewar
2001-01-02 13:27 ` Andrew Hately
2001-01-02 16:46   ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox