From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6426898aedaa5880 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer!btnet!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Pragma for conditional compilation? (Ada 2005 vs. 95) From: Georg Bauhaus In-Reply-To: <1190879769.361848.188220@22g2000hsm.googlegroups.com> References: <1190879769.361848.188220@22g2000hsm.googlegroups.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: # Message-Id: <1190885467.22443.5.camel@sonnenregen> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Date: Thu, 27 Sep 2007 11:31:07 +0200 NNTP-Posting-Date: 27 Sep 2007 11:31:07 CEST NNTP-Posting-Host: 57710ab8.newsspool4.arcor-online.net X-Trace: DXC=_S`VW39Qm8jeoCI^f\Y]Ea4IUK On Thu, 2007-09-27 at 00:56 -0700, Jerry wrote: > Is there a pragma to designate some lines of Ada for conditional > compilation depending on if the compiler is Ada 2005 or not? > > ... If > the compiler provides those declarations (i.e., is 2005), I want to > use the compiler's version because I figure that is the cleanest way > to get things done. If the compiler is Ada 95, I instead want to > provide the declarations myself. > > Currently, I handle this by commenting out the declarations of my own > if Ada 2005 and uncomment them if Ada 95. Sounds like simple configuration management will help. If you are using GNAT, make two project files, and two source directories for units that differ. Import the proper files from your source code repository, or select source directories using some make tool, ... -- Georg