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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,38159b1b5557a2e7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-23 05:11:08 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!logbridge.uoregon.edu!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!newsread3.news.atl.earthlink.net.POSTED!d9c68f36!not-for-mail Message-ID: <40111D69.5000005@noplace.com> From: Marin David Condic User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (OEM-HPQ-PRS1C03) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Standard Ada Preprocessor References: <400BD4B5.6000307@noplace.com> <400BDB7C.40100@noplace.com> <400D2150.6000705@noplace.com> <400E72F9.8060501@noplace.com> <400FD4F7.8050805@noplace.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 23 Jan 2004 13:11:07 GMT NNTP-Posting-Host: 209.165.26.148 X-Complaints-To: abuse@earthlink.net X-Trace: newsread3.news.atl.earthlink.net 1074863467 209.165.26.148 (Fri, 23 Jan 2004 05:11:07 PST) NNTP-Posting-Date: Fri, 23 Jan 2004 05:11:07 PST Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:4705 Date: 2004-01-23T13:11:07+00:00 List-Id: I agree that if you can isolate something down in a low-level "System Dependency" package and swap those out easily, that you have *an* answer to some (if not all) problems. I've done this thousands of times. I've described cases elsewhere in this thread that *must* be dealt with at compile time (either by having separate configuration dependent units and some kind of conditional build tools or by having conditional compilation.) I'll bet you've even encountered things like a given declaration that works fine on one compiler but doesn't work on another or a statement that is legal and compiles for one compiler but is illegal for another. There are all sorts of allowed compiler differences - without even bringing up the subject of trying to get around compiler bugs. So if there's issues that have to be resolved at compile time and I can't guarantee that there is some external configuration management and/or build tools available to make maintaining separate units possible (if not always desirable) then I want some kind of conditional compilation to help me maintain a single body of code that works for more than one configuration. MDC Georg Bauhaus wrote: > What kind of difficulties do you see that could be better solved > by a preprocessor? (Things supported in GNAT but not ObjectAda or vice > versa? Dependence on pragmata?) > > I have code that is compiled by OA 722, by GCC 34, but not by GNAT 3.15p. > Ada source text is chopped where necessary using make. > (Operating) System specific routines are are assembled into a > package hierarchy (which I naively had top-level-named "System" (and > that triggers a bug box in GCC 34 after looping (the maintainers > say that, obviously, a library unit should not be modified...))) > Then a branch renames package Systems.Windows, another renames > package Systems.UNIX (or similarly). > > The problem that leads GNAT 3.15p to reject another unit is > apparently a bug in GNAT 3.15p that has been fixed in GCC 34. > I like this better than having to construct sources around a > compiler bug/limitation using hopefully temporary preprocessor #ifs. > -- ====================================================================== Marin David Condic I work for: http://www.belcan.com/ My project is: http://www.jsf.mil/NSFrames.htm Send Replies To: m o d c @ a m o g c n i c . r "Face it ladies, its not the dress that makes you look fat. Its the FAT that makes you look fat." -- Al Bundy ======================================================================