comp.lang.ada
 help / color / mirror / Atom feed
From: "Christoph Karl Walter Grein" <AdaMagica@web.de>
To: comp.lang.ada@ada-france.org
Subject: Re: Semantics of Inline vs non-Inline
Date: Mon, 18 Oct 2004 08:29:00 +0200
Date: 2004-10-18T08:29:00+02:00	[thread overview]
Message-ID: <mailman.36.1098264740.10401.comp.lang.ada@ada-france.org> (raw)

From: Wojtek Narczynski <wojtek@power.com.pl>

> > RM 13.3(15..18) specify the recommended level of support.
> 
> Those paragraphs do not mandate returning a rubbish address for unsuported
> cases. Also please note that if you use other attributes in context where
> it does not make sense, the compiler will tell you about it.

When you're going outside the recommended level of support, you're on your own and can't blame the compiler
vendor. It's a nice feature if you get a warning. And ACT is very open to proposals for better compiler messages.
(I do not know who the compiler vendor of the OP is.)

> > RM 13.3(13) says it's the programmer's responsibility to ensure the
> > address is valid.
> 
> "If an Address is specified, it is the programmer's responsibility to
> ensure that the address is valid; otherwise, program execution is
> erroneous."
> 
> This does not say anything about when 'Address produces correct result, it
> only says that in "for X'Address use <XXXXX>", you're supposed to provide
> correct <XXXXX>.

  function Push( Datum : Datum_Type ) return List.Cell_Ptr is
     LM_Datum : List.Datum_Type;
     for LM_Datum'Address use Datum'Address;

And here, no correct <XXXXX> is provided. So RM 13.3(13) is violated. Therefore the program is erroneous.

Erroneous means: The compiler need not detect this. If it doesn't, the program is free to do anything. The (in)famous
nasal demons :-)
________________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt neu bei WEB.DE FreeMail: http://freemail.web.de/?mc=021193




             reply	other threads:[~2004-10-18  6:29 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-18  6:29 Christoph Karl Walter Grein [this message]
2004-10-20 15:07 ` Semantics of Inline vs non-Inline Wojtek Narczynski
  -- strict thread matches above, loose matches on Subject: below --
2004-10-21 11:21 Christoph Karl Walter Grein
2004-10-21 20:57 ` Wojtek Narczynski
2004-10-22  0:46 ` skidmarks
2004-10-22  5:50   ` Simon Wright
2004-10-22 12:57     ` Wojtek Narczynski
2004-10-21  5:07 Christoph Karl Walter Grein
2004-10-21 10:24 ` Wojtek Narczynski
2004-10-15  6:18 Christoph Karl Walter Grein
2004-10-15 11:02 ` Wojtek Narczynski
     [not found] <35f054ea.0410140733.5f250e6f@posting.google.com>
2004-10-14 16:14 ` Wojtek Narczynski
2004-10-14 20:05   ` Arthur Schwarz
2004-10-15 10:24     ` Wojtek Narczynski
2004-10-15 16:32       ` Arthur Schwarz
2004-10-14 17:58 ` Martin Krischik
2004-10-15  0:49   ` Arthur Schwarz
2004-10-15  8:05     ` Martin Krischik
2004-10-15 16:39       ` Arthur Schwarz
2004-10-15 16:40       ` Arthur Schwarz
2004-10-15 16:40       ` Arthur Schwarz
2004-10-15 16:45       ` skidmarks
2004-10-15  3:40 ` Steve
2004-10-15  5:50 ` Simon Wright
2004-10-15 16:57   ` skidmarks
2004-10-18 17:01 ` skidmarks
replies disabled

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