Re: Range checking not working as expected?
- From: "Randy Brukardt" <randy@xxxxxxxxxxxxxx>
- Date: Thu, 28 Jul 2005 19:18:46 -0500
"Maciej Sobczak" <no.spam@xxxxxxxxxxx> wrote in message
news:dcatvk$iji$1@xxxxxxxxxxxxxxxxxx
> Vinzent 'Gadget' Hoefler wrote:
>
> > Try again after compiling with -gnato to actually enable the overflow
> > checking.
>
> OK, it "works" now. It is still not what I'd expect - "the default in
> Ada is safety", or something like this; I'd expect to actually need to
> go into some troubles to disable such checking.
You *should* be right. However, GNAT does not default to the behavior
required by the Ada standard in various ways. Some differences might be an
improvement (-gnatE), but IMHO there is no real justification for the
overflow check.
In any case, this has nothing to do with Ada, but rather with a particular
widely-used implementation of it. So far as I'm aware, the other major Ada
compilers all default to doing this checking (that is, they follow the
standard closely by default). Remember, GNAT /= Ada; it's just one
implementation of Ada.
Randy.
.
- References:
- Range checking not working as expected?
- From: Maciej Sobczak
- Re: Range checking not working as expected?
- From: Vinzent 'Gadget' Hoefler
- Re: Range checking not working as expected?
- From: Maciej Sobczak
- Range checking not working as expected?
- Prev by Date: Re: Help needed for ada package
- Next by Date: Re: Private primitive operations available to entire package hierarchy. Can it be done?
- Previous by thread: Re: Range checking not working as expected?
- Next by thread: OT: definition of "significant figures"
- Index(es):
Relevant Pages
|