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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,391464232b8157e2 X-Google-Attributes: gid103376,public From: Florian Weimer Subject: Re: GNAT and GCC compatability. Date: 1999/09/28 Message-ID: <87n1u6khco.fsf@deneb.cygnus.argh.org>#1/1 X-Deja-AN: 530577034 References: Mail-Copies-To: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@cygnus.argh.org X-Trace: deneb.cygnus.argh.org 938544167 8915 192.168.1.2 (28 Sep 1999 18:42:47 GMT) Organization: Penguin on board User-Agent: Gnus/5.070096 (Pterodactyl Gnus v0.96) Emacs/20.4 Mime-Version: 1.0 NNTP-Posting-Date: 28 Sep 1999 18:42:47 GMT Newsgroups: comp.lang.ada Date: 1999-09-28T18:42:47+00:00 List-Id: Preben Randhol writes: > "Larry Stanbery" writes: > > | I searched DejaNews for info on this, but found none... > | > | I've currently got GNAT 3.11p, and realized I had a need to compile some C++ > | code I obtained. I checked, and, of course, GNAT doesn't install g++ and > | the associated header files, etc. So, I wanted to know if there are things > | I need to watch out for -- do I need a specific version of gcc? Things like > | that. > > It depends. What kind of system do you have ? Linux, Solaris, DEC > ... which distribution. Additional questions are: Are you going to use the GNAT C++ interface? Has the C++ code already been compiled successfully with a GNU compiler? Which standard libraries are used? Is it ISO C++? (Compiler vendors often provide different implementations of for-scoping rules, templates, exception and RTTI, more or less ignoring the standard. C++ is not Ada.) Both C++ and the GNU implementation changed a lot in the past few years. If you know that a certain GCC version compiles the code correctly, you should probably use that one. Otherwise, you might want to try several GCC versions: 2.7.2.3, 2.8.1 and 2.95.1 are the three latest major releases. Note that you shouldn't build the C++ compiler from a GNAT-patched source tree, because some portions of the GCC backend are also changed and the resulting C++ compiler, which would include these changes as well, hasn't been tested. > Some C++ programs uses STL templates ++ then you need either the > latest gcc 2.95 (I think) or egcs. There isn't an egcs project anymore. The egcs development is the current GCC tree (`GNU Compiler Collection'), GCC 2.95 and 2.95.1 are releases based on this development tree (i.e., the former egcs tree).