comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: How many Ada compiler bugs are here?
Date: Thu, 12 Jan 2012 18:21:01 -0600
Date: 2012-01-12T18:21:01-06:00	[thread overview]
Message-ID: <jentdh$4sd$1@munin.nbi.dk> (raw)
In-Reply-To: 01dd6341-9c3c-4dcb-90f8-6ac66c65eb66@z1g2000vbx.googlegroups.com

"Maciej Sobczak" <see.my.homepage@gmail.com> wrote in message 
news:01dd6341-9c3c-4dcb-90f8-6ac66c65eb66@z1g2000vbx.googlegroups.com...
...
> 1. Adjust should not be allowed to be declared (it is a *limited*
> type). But I have defined it to trace the remaining bugs:

There's nothing wrong with defining "Adjust" (you can define any named 
subprogram you want, of course), but (A) "overriding" shouldn't be allowed 
on it, and (B) it shouldn't be called automatically if it is defined without 
"overriding", because it is not special for a limited type.

> 2. The return statement in Make_T should not be required, because it
> is unreachable anyway.

Ada requires all functions to have a return statement. 6.5(5/2). This was an 
Ada 83 rule; we've discussed removing it, but the feeling was that it 
catches as many errors as it creates, and we just couldn't justify a change 
to the language that didn't seem to be an obvious improvement. (In my 
personal work, it has been about 50-50 as to whether it helps or hinders.)

So the requirement for a return statement is not a bug, it's a language 
rule.

> 3. Logically, Tmp is never created, because Make_T raises an
> exception. Somehow some object is finalized. Apparently it is Tmp,
> which should not exist.
> 4. Somehow Tmp.initialized = True, even though its default value is
> defined to be False.

I'm not sure if these are actually bugs or not; the fact that Adjust is 
being called for a limited object means to me that nothing that happens 
afterwards makes any sense from a formal language perspective, so you can't 
really say if there is a bug. Garbage-in, garbage-out! Does the same thing 
happen without Adjust being defined? That would seem more like a bug.

                                                Randy.





  reply	other threads:[~2012-01-13  0:21 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-12 23:20 How many Ada compiler bugs are here? Maciej Sobczak
2012-01-13  0:21 ` Randy Brukardt [this message]
2012-01-13  1:26   ` Adam Beneschan
2012-01-13  8:23     ` Dmitry A. Kazakov
2012-01-13  8:47       ` AdaMagica
2012-01-13  9:07         ` Dmitry A. Kazakov
2012-01-13  9:35           ` AdaMagica
2012-01-13 10:00             ` Dmitry A. Kazakov
2012-01-13 10:38               ` georg bauhaus
2012-01-13 11:39                 ` Dmitry A. Kazakov
2012-01-13 12:43                   ` Georg Bauhaus
2012-01-13 13:06                     ` AdaMagica
2012-01-13 13:16                       ` AdaMagica
2012-01-13 13:22                       ` Georg Bauhaus
2012-01-13 13:29                         ` Dmitry A. Kazakov
2012-01-13 10:52               ` AdaMagica
2012-01-13 11:35                 ` Dmitry A. Kazakov
2012-01-13 12:58                   ` AdaMagica
2012-01-13 13:43                     ` Dmitry A. Kazakov
2012-01-13 15:06                       ` Robert A Duff
2012-01-13 15:46                         ` Dmitry A. Kazakov
2012-01-13 17:42                           ` georg bauhaus
2012-01-13 18:52                             ` Dmitry A. Kazakov
2012-01-14  0:26                           ` Randy Brukardt
2012-01-14  9:49                             ` Dmitry A. Kazakov
2012-01-19  1:35                               ` Randy Brukardt
2012-01-19 10:33                                 ` Dmitry A. Kazakov
2012-01-14  2:41                           ` Robert A Duff
2012-01-13 17:23               ` Adam Beneschan
2012-01-14  2:41                 ` Robert A Duff
2012-01-13 17:15       ` Adam Beneschan
2012-01-13 20:06   ` Blady
2012-01-13 23:30     ` Adam Beneschan
2012-01-14 13:29       ` Brian Drummond
2012-01-19  1:47         ` Randy Brukardt
2012-01-19  4:24           ` Adam Beneschan
2012-01-20  0:04             ` Randy Brukardt
2012-01-14 10:20   ` Maciej Sobczak
2012-01-14 14:03     ` Brian Drummond
2012-01-16 16:35     ` Adam Beneschan
2012-01-20 10:43       ` Brian Drummond
replies disabled

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