comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Interesting effects in array renaming
Date: Mon, 23 Jun 2003 13:37:54 +0200
Date: 2003-06-23T13:37:54+02:00	[thread overview]
Message-ID: <bd6olc$p3fpa$1@ID-77047.news.dfncis.de> (raw)
In-Reply-To: bd6kpk$kr0$3@a1-hrz.uni-duisburg.de

Georg Bauhaus wrote:

> Dmitry A. Kazakov <mailbox@dmitry-kazakov.de> wrote:
> : 
> : "... any constraint implied by the subtype_mark of the
> : object_renaming_declaration is ingored)."
> : 
> : I.e. whatever subtype you, a programmer, might specify I, the compiler,
> : will shamelessly ignore it!
> : 
> : How safe! Do you really think it is OK? Consider this:
>  [...]
> : I see only two alternatives:
> : 
> : Either to add a dynamic semantics ensuring that the result of renaming
> : is a valid object of the declared subtype. [X2 raises Constraint_Error
> : if Constrained'Range /= X'Range]
>  
> I think the compiler could warn about possibly
> "incompatible" constraints in a renaming declaration.
> 
> Have you written to the producers of your compiler?

It is same in both GNAT and ObjectAda, but it is absolutely legal according 
to ARM. The problem is ARM itself. Which opens such a hole. What sense have 
our complains about buffer overruns in C/C++, in presense of this? It is 
also a range check optimization problem, because the compiler cannot rely 
on subtype information. Very bad.

-- 
Regards,
Dmitry A. Kazakov
www.dmitry-kazakov.de



  reply	other threads:[~2003-06-23 11:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-22 14:52 Interesting effects in array renaming Dmitry A. Kazakov
2003-06-22 17:24 ` Jeffrey Carter
2003-06-23  8:12   ` Dmitry A. Kazakov
2003-06-23 10:29     ` Georg Bauhaus
2003-06-23 11:37       ` Dmitry A. Kazakov [this message]
2003-06-23 13:28         ` Georg Bauhaus
2003-06-24  7:35           ` Dmitry A. Kazakov
2003-06-24 14:38             ` Georg Bauhaus
2003-06-25 10:28               ` Dmitry A. Kazakov
2003-06-25 14:23                 ` Georg Bauhaus
2003-06-25 19:00                   ` Dmitry A. Kazakov
2003-06-24  2:35     ` Robert I. Eachus
2003-06-24  7:35       ` Dmitry A. Kazakov
2003-06-24 10:08         ` Lutz Donnerhacke
2003-06-24 11:53         ` Georg Bauhaus
2003-06-24 12:48           ` Dmitry A. Kazakov
2003-06-26  2:54             ` Randy Brukardt
2003-06-26  6:27               ` Vinzent Hoefler
2003-06-26 12:44                 ` Georg Bauhaus
2003-06-26 13:01                   ` Vinzent Hoefler
replies disabled

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