comp.lang.ada
 help / color / mirror / Atom feed
From: robert_dewar@my-dejanews.com
Subject: Re: Handling Addressing Errors
Date: 1999/03/04
Date: 1999-03-04T00:00:00+00:00	[thread overview]
Message-ID: <7bm0v3$933$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 1999Mar3.212443.1898@nosc.mil

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

In article <1999Mar3.212443.1898@nosc.mil>,
  claveman@cod.nosc.mil (Charles H. Sampson) wrote:
> This code worked for a particular version of a particular
> compiler, but I see a couple of problems.  The first is
> that, as well as I can tell, this is a non-standard
> raising of Program_error;

Absolutely, this is quite non-standard. Obviously your
program is erroneous and anything could happen if the
address is invalid.

The proper solution is to write a separate target dependent
unit (in an appropriate language) that determines if an
address is valid.


> The second is, what prevents an optimizing compiler from
> deciding that the assignment statement is unnecessary
> (BOGUS is never referenced after being set) so that it
> doesn�t need to access BOARD_LOCATION?

Common sense and reasonable behavior!

Any compiler that does not use an address clause to trigger
an implicit volatility is poorly designed in my view. Of
course it does not harm to put in a specific pragma
Volatile, and that will most certainly solve this problem

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




  parent reply	other threads:[~1999-03-04  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-03  0:00 Handling Addressing Errors Charles H. Sampson
1999-03-04  0:00 ` Nick Roberts
1999-03-04  0:00 ` robert_dewar [this message]
1999-03-18  0:00   ` Charles H. Sampson
1999-03-18  0:00     ` Nick Roberts
1999-03-21  0:00       ` robert_dewar
1999-03-18  0:00     ` Tucker Taft
1999-03-19  0:00       ` Mikko Levanto
1999-03-19  0:00         ` Nick Roberts
1999-03-20  0:00         ` Tucker Taft
1999-04-02  0:00       ` Charles H. Sampson
1999-03-19  0:00     ` robert_dewar
replies disabled

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