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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,4ffc4a297a9f10e0 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news4.google.com!feeder.news-service.com!newsfeed.straub-nv.de!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Thoughts on AdaCore maintaining GCC-incompatible GNAT sources Date: Mon, 24 Jan 2011 19:29:17 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <62c8c6c1-6578-4e61-b68a-2c192f34aa94@f20g2000prn.googlegroups.com> <1456fbc5-f951-4721-8575-0b73a492f275@r29g2000yqj.googlegroups.com> <80886810-73e0-4eea-88e3-6653afc2f45b@a28g2000prb.googlegroups.com> <82k4hyq328.fsf@stephe-leake.org> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1295918958 8374 69.95.181.76 (25 Jan 2011 01:29:18 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 25 Jan 2011 01:29:18 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 X-RFC2646: Format=Flowed; Response Xref: g2news1.google.com comp.lang.ada:16675 Date: 2011-01-24T19:29:17-06:00 List-Id: "Yannick Duch�ne (Hibou57)" wrote in message news:op.vpo4zvvaule2fv@garhos... >Le Sat, 22 Jan 2011 06:09:25 +0100, Randy Brukardt >a �crit: >> Case in point, I recently recompiled Janus/Ada with the current Janus/Ada >> compiler (rather than the older baseline compiler). That ended up taking >> parts of 8 days! And that was with nothing expecting needing change in >> either the building setup or compiler source. >> [.] >> Anyway, I'd consider it a miracle if anyone could compile something as >> large >> as the GNAT sources with anything other than the exact setup they were >> originally created with. There is just too much chance of running across >> some obscure bug otherwise. >I am not sure to understand. I could already built some GNAT binaries >without so much trouble, even with some modified setup (I even modified >some tiny things in some minor parts of the compiler itself at that time). > >What do you mean by "the exact same setup" here ? Can you explain with an >example ? I meant the same compiler, runtime libraries, tools, etc. >What would be amazing, would be valid sources not compiling (and most of >GNAT is written in Ada). That sound mysterious. "Ada" is an abstract notion. No compiler implements Ada exactly right, and I'm dubious that is even possible. There are literally billions on combinations possible, and of course most of those combinations are harmless. But there always are some that are not. Beyond that, the source code isn't really "Ada", its some close relative. One of the problems I had with the Janus/Ada (which is also all in Ada, and almost all in Ada 83) was that there was some error checking that previous Janus/Ada compilers had missed, but now was being detected. The code was obviously "non-Ada" in this sense, and there was no intent that such code be "non-Ada", but it happened anyway. It is trivally easy to depend on a bug in a compiler; almost all large programs do. (That's why large projects usually "freeze" their compilers at some point.) Moreover, bugs can extend beyond the source code. The problem I had with the Janus/Ada optimizer occurred because the code being optimized was too simple! The code was so simple that the optimizer actually was making it bigger and that caused the buffer to overflow (since it doesn't know how to grow - it's not needed). This isn't the sort of effect that you could notice from normal testing -- you actually would have to try to compile packages with that sort of code (no test programs were large enough to expose the problem). I'm sure GNAT has somewhat fewer of these issues, as their compiler has more users than Janus/Ada does, but that isn't likely to make it free of such issues, just a bit less likely to show them. Randy.