comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Thoughts on AdaCore maintaining GCC-incompatible GNAT sources
Date: Mon, 24 Jan 2011 19:29:17 -0600
Date: 2011-01-24T19:29:17-06:00	[thread overview]
Message-ID: <ihl91e$85m$1@munin.nbi.dk> (raw)
In-Reply-To: op.vpo4zvvaule2fv@garhos

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2856 bytes --]

"Yannick Duch�ne (Hibou57)" <yannick_duchene@yahoo.fr> wrote in message 
news:op.vpo4zvvaule2fv@garhos...
>Le Sat, 22 Jan 2011 06:09:25 +0100, Randy Brukardt <randy@rrsoftware.com> 
>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. 





  reply	other threads:[~2011-01-25  1:29 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-20 10:58 Thoughts on AdaCore maintaining GCC-incompatible GNAT sources deadlyhead
2011-01-20 13:37 ` Ludovic Brenta
2011-01-20 14:50   ` Yannick Duchêne (Hibou57)
2011-01-20 17:47     ` J-P. Rosen
2011-01-20 18:46       ` Yannick Duchêne (Hibou57)
2011-01-20 21:03         ` Simon Wright
2011-01-20 21:56           ` deadlyhead
2011-01-21  0:08             ` qunying
2011-01-21  4:43             ` Stephen Leake
2011-01-22  5:09               ` Randy Brukardt
2011-01-22  6:15                 ` Yannick Duchêne (Hibou57)
2011-01-25  1:29                   ` Randy Brukardt [this message]
2011-02-06 19:58                     ` Yannick Duchêne (Hibou57)
2011-01-21  7:19             ` J-P. Rosen
2011-01-21  9:29               ` Dmitry A. Kazakov
2011-01-21  9:57                 ` Yannick Duchêne (Hibou57)
2011-01-21 13:51                 ` J-P. Rosen
2011-01-21 15:26                 ` Fritz Wuehler
2011-01-21 19:50                   ` Yannick Duchêne (Hibou57)
2011-02-05 12:40                 ` Marco
2011-01-22 15:29             ` Lucretia
2011-01-21  7:11         ` J-P. Rosen
2011-01-21  4:33     ` Stephen Leake
2011-01-21  5:00       ` Shark8
2011-01-21  6:26         ` Thomas Løcke
2011-01-21 10:05           ` Yannick Duchêne (Hibou57)
2011-01-21 19:11           ` Oliver Kellogg
2011-01-21 19:42             ` Yannick Duchêne (Hibou57)
2011-01-21 20:41               ` Simon Wright
2011-01-21 22:14                 ` Yannick Duchêne (Hibou57)
2011-01-22 15:28 ` Lucretia
2011-02-03  9:40   ` deadlyhead
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox