From: Jeffrey Creem <jeff@thecreems.com>
Subject: Re: Pragma for conditional compilation? (Ada 2005 vs. 95)
Date: Fri, 28 Sep 2007 12:15:01 GMT
Date: 2007-09-28T12:15:01+00:00 [thread overview]
Message-ID: <ca6vs4-h3u.ln1@newserver.thecreems.com> (raw)
In-Reply-To: <yP%Ki.124362$Fc.29034@attbi_s21>
Jeffrey R. Carter wrote:
> Jerry wrote:
>>
>>> The third real old way is to code in the option by a "IF-THEN-ELSE-END"
>>> statements and use a Global constant variable(s). Its low tech but it
>>> still works.
>>
>> OK, but my "problem" is in declaring types which I want to be visible
>> in 95 but not visible in 05, as 05 provides them itself. An "IF-THEN-
>> ELSE-END" solution would have to be in the executable part of the
>> program (right?).
>
> Despite the claim, this will not work. You cannot compile Ada-07 code
> with an Ada-95 compiler. Different bodies for different compilers,
> selected somehow (project files are a good way with GNAT, as has been
> suggested) is the best way to address this issue.
>
I agree that in general, given where Ada is, the best way to solve these
issues is the whole "you have a CM problem" thing...But it really is
sort of just a mantra that we repeat and all hope it is true.
The problem is that in the C world, for good (sometimes) or evil
(equally often) people can portably but painfully use the pre-processor
to deal with compiler and platform portability issues.
We claim it is a CM problem but of course now you trade a language
portability problem for a CM/build chain portability problem. Finding a
build system or CM system that works portability is now just another
problem to deal with.
I am not saying conditional compilation is the real answer, but pointing
to something that is outside the language definition as the answer is
somewhat of a cop out.
next prev parent reply other threads:[~2007-09-28 12:15 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-27 7:56 Pragma for conditional compilation? (Ada 2005 vs. 95) Jerry
2007-09-27 9:31 ` Georg Bauhaus
2007-09-27 16:59 ` Pascal Obry
2007-09-27 21:56 ` Jerry
2007-09-27 9:52 ` Stephen Leake
2007-09-27 9:58 ` Brian Drummond
2007-09-27 15:26 ` anon
2007-09-27 21:46 ` Jerry
2007-09-28 4:55 ` Jeffrey R. Carter
2007-09-28 12:15 ` Jeffrey Creem [this message]
2007-09-28 14:06 ` Jean-Pierre Rosen
2007-09-28 15:24 ` Ludovic Brenta
2007-09-28 16:08 ` Jean-Pierre Rosen
2007-09-28 17:54 ` Georg Bauhaus
2007-09-28 18:19 ` Pascal Obry
2007-09-28 20:02 ` Stefan Bellon
2007-09-28 20:14 ` Pascal Obry
2007-09-28 20:26 ` Stefan Bellon
2007-09-29 10:24 ` Stephen Leake
2007-09-28 20:04 ` Simon Wright
2007-09-28 20:11 ` Pascal Obry
2007-09-29 10:29 ` Stephen Leake
2007-09-29 10:18 ` Stephen Leake
2007-09-28 18:07 ` anon
2007-09-29 22:13 ` Jerry
2007-09-30 10:54 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox