comp.lang.ada
 help / color / mirror / Atom feed
From: Guillaume <guifo@wanadoo.fr>
Subject: Re: First time Ada has let me down
Date: Thu, 26 Oct 2000 22:27:57 +0000
Date: 2000-10-26T20:26:49+00:00	[thread overview]
Message-ID: <8ta429$mtt$1@wanadoo.fr> (raw)
In-Reply-To: 39F7AC37.FF6445D@acm.org

Jeff Carter wrote:

> Shifty wrote:
> >   function Calculate_Ip_Header_Length
> >              (Byte_At : in System.Address) return Integer is
> 
> It's extremely rare to need to use addresses in all-Ada code except when
> dealing with hardware, even in Ada 83. It generally indicates either a
> poor design or a lack of understanding of the capabilities of the
> language.

Agreed !
Aliasing effective parameters is not a good way to employ the "use at" 
clause, as it may break program execution especially with optimization 
options turned on. I've experienced this myself, the compiler I use at work 
produces executables which raise program_error on such code. I've not 
investingated a lot but with a procedure with a small enough effective 
parameter, the compiler I use seems to copy this parameter in a CPU 
register making the "use at" clause totally wrong !

I may seem to repeat here but ... the RM is your friend ...

"Address clauses should not be used to achieve overlays of objects or 
overlays of program units. Nor should a given interrupt be linked to more 
than one entry. Any program using address clauses to achieve such effects 
is erroneous."

Point your browser to :

http://www.adahome.com/LRM/83/RM/rm83html/lrm-13-05.html#13.5

        Guillaume



  parent reply	other threads:[~2000-10-26 22:27 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-25  3:50 First time Ada has let me down Shifty
2000-10-25  0:00 ` Ken Garlington
2000-10-25  0:00   ` Shifty
2000-10-26  4:00     ` Jeff Carter
2000-10-26 14:43       ` Ted Dennison
2000-10-26 17:55         ` tmoran
2000-10-26 17:12       ` Shifty
2000-10-27  1:00         ` Jeff Carter
2000-10-26 22:27       ` Guillaume [this message]
2000-10-26 21:49         ` Keith Thompson
2000-10-26 14:36     ` Ted Dennison
2000-10-26 17:55       ` tmoran
2000-10-26 23:08         ` Ted Dennison
2000-10-25  0:00 ` Larry Kilgallen
2000-10-25  0:00   ` Ted Dennison
2000-10-25  0:00     ` Larry Kilgallen
2000-10-25  0:00       ` Ted Dennison
2000-10-25  0:00 ` wv12
2000-10-25  0:00   ` Gisle Sælensminde
2000-10-25  0:00   ` Gautier
2000-10-25  0:00   ` Joel Seidman
2000-10-26  6:42   ` tmoran
2000-10-25  0:00 ` First time Ada has let me down (recipe) Guillaume
2000-10-26  2:45   ` Mats Weber
2000-10-25  4:44 ` First time Ada has let me down Julian Morrison
2000-10-25  4:50 ` Ted Dennison
2000-10-24  0:00   ` Keith Thompson
2000-10-26  0:00   ` Andreas Schulz
2000-10-26 18:05     ` Alejandro Villanueva
2000-10-26 21:46 ` Tucker Taft
replies disabled

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