comp.lang.ada
 help / color / mirror / Atom feed
From: billjones6789@yahoo.com
Subject: Re: Bug in Ada (SuSe 10.2) ?
Date: Tue, 26 Feb 2008 08:46:11 -0800 (PST)
Date: 2008-02-26T08:46:11-08:00	[thread overview]
Message-ID: <48a0a0c4-7b79-42dc-b541-7a68693bdd4c@e41g2000hsc.googlegroups.com> (raw)
In-Reply-To: fpvn0n$l8i$1@jacob-sparre.dk

On Feb 25, 4:32 pm, "Randy Brukardt" <ra...@rrsoftware.com> wrote:
> I spend so much time in the language-lawyer cave (which requires only formal
> terminology) that I can get confused by informal terminology -- especially
> that which is not used in the standard. (Yes, I realize you found a mention
> of it in a non-normative introduction paragraph, but of course I hardly ever
> read those...)
> ...
> Net-net I tend to forget about the accessibility checks on anonymous access
> parameters, because if you encounter them you probably are doing something
> bad (using anonymous access parameters).

If you are suggesting that the prevention of dangling pointers (into
the stack)
is simply non-normative flowery language intended to be ignored or
forgotten,
then I disagree.  I think it is a fundamental language invariant that
users
should be able to rely on to prevent the worst kind of programming
errors
(scribbling on arbitrary memory).

Paragraph 3 of 3.10.2, which _is_ normative, repeats the invariant:
"The accessibility rules, which prevent dangling references ...".
And the Ada 95 Rationale repeats it as well in Section 3.7, paragraph
3,
which says: "An additional accessibility check is performed to ensure
that the lifefime of the designated subprogram or object will not end
before that of the access type, eliminating the possibility of
dangling
references."

> You are using anonymous access parameters to achieve the effect. You are
> quite correct that this is easy to do. That is in fact the problem: it is
> easy to get a Program_Error from passing the "wrong" thing to a subprogram
> that has an anonymous access parameter.

You are completely missing the point.  The simple examples provided
show
that it is _not_ so easy to get a Program_Error where one is expected.

> Anyway, I'm pretty sure this is getting wildly off-topic.

To bring it back on topic, an unsuspecting Ada programmer will be
quite
surprised to see overflow checks and stack checks not performed by
default
in some cases, and will be equally surprised to see accessibility
checks
not performed by default in some cases.  For overflow and stack
checks,
there is a rather simple solution involving specifying default flags
in
the project file.  But for accessibility checks, I do not know of any
similar solution.




  reply	other threads:[~2008-02-26 16:46 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-19  8:47 Bug in Ada (SuSe 10.2) ? Reinert Korsnes
2008-02-19  9:08 ` Niklas Holsti
2008-02-19  9:53   ` Reinert Korsnes
2008-02-19 11:21     ` Ludovic Brenta
2008-02-20 12:41       ` Reinert Korsnes
2008-02-20 16:50         ` Adam Beneschan
2008-02-20 18:31           ` Jeffrey R. Carter
2008-02-20 23:10             ` Adam Beneschan
2008-02-20 23:22             ` Adam Beneschan
2008-02-21  0:31               ` Randy Brukardt
2008-02-21  8:56                 ` Jean-Pierre Rosen
2008-02-21  9:08                   ` Alex R. Mosteo
2008-02-21  9:27                     ` Ludovic Brenta
2008-02-21  9:46                       ` billjones6789
2008-02-21 12:27                         ` Access type (mis)use (Was: Bug in Ada (SuSe 10.2) ?) Jacob Sparre Andersen
2008-02-21 19:40                           ` Bob Klungle
2008-02-21 21:25                             ` Jeffrey R. Carter
2008-02-21 21:57                             ` Vadim Godunko
2008-02-21 22:32                         ` Bug in Ada (SuSe 10.2) ? Randy Brukardt
2008-02-22 16:10                           ` billjones6789
2008-02-22 19:21                             ` Georg Bauhaus
2008-02-22 21:29                               ` Vadim Godunko
2008-02-22 21:39                                 ` Robert A Duff
2008-02-23 10:16                               ` billjones6789
2008-02-22 19:52                             ` Randy Brukardt
2008-02-23 10:36                               ` billjones6789
2008-02-26  0:32                                 ` Randy Brukardt
2008-02-26 16:46                                   ` billjones6789 [this message]
2008-02-26 20:53                                     ` Randy Brukardt
2008-02-27  1:05                                     ` Robert A Duff
2008-02-27 10:06                                       ` billjones6789
2008-02-27 17:49                                         ` Robert A Duff
2008-02-28  0:30                                           ` Randy Brukardt
2008-02-28 15:33                                             ` Robert A Duff
2008-03-06 17:46                                             ` Adam Beneschan
2008-02-21  0:31               ` Jeffrey R. Carter
2008-02-21  0:35                 ` Jeffrey R. Carter
2008-03-06 11:55                   ` Colin Paul Gloster
2008-02-21  0:55               ` tmoran
2008-02-21  8:08                 ` billjones6789
2008-02-21  9:11                 ` Alex R. Mosteo
2008-02-21 23:01                   ` Randy Brukardt
2008-02-22 16:43                 ` Adam Beneschan
2008-02-22  9:06               ` Stephen Leake
2008-02-22  5:40       ` Gautier
replies disabled

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