comp.lang.ada
 help / color / mirror / Atom feed
From: mheaney@ni.net (Matthew Heaney)
Subject: Re: 'size attribute inheritance
Date: 1997/08/13
Date: 1997-08-13T00:00:00+00:00	[thread overview]
Message-ID: <mheaney-ya023680001308972242460001@news.ni.net> (raw)
In-Reply-To: EEv8xA.HqH@world.std.com


In article <EEv8xA.HqH@world.std.com>, bobduff@world.std.com (Robert A
Duff) wrote:

>This was correct behavior for Ada 83, but if it's an Ada 95 compiler, it
>has a bug.  The indexing expression must either raise C_E or P_E or else
>return some value.  It can't dump core.

Wow!  I didn't realize the language had changed that way.  (Yes, the
compiler I'm talking about is Ada 83.)

>>The developer assumed that a Constraint_Error would be raised, but as I
>>pointed out in the previous post, this is never a safe, portable assumption
>>to make.  The compiler can legally omit a range check, reasoning that since
>>Index is an object of type Itype, and Itype is the array index subtype, no
>>check is required, because Index has to be in the array's range.
>
>No longer true in Ada 95.

I figured to get this behavior you'd require support of the Safety Annex. 
I didn't know Ada 95 comes that way out of the box.

Does unitialized variable checking only apply to array index variables? 
And do you have an AARM reference?

--------------------------------------------------------------------
Matthew Heaney
Software Development Consultant
<mailto:matthew_heaney@acm.org>
(818) 985-1271




  reply	other threads:[~1997-08-13  0:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-08-09  0:00 'size attribute inheritance Carlos Palenzuela
1997-08-10  0:00 ` Robert Dewar
1997-08-11  0:00   ` Matthew Heaney
1997-08-11  0:00   ` Ken Garlington
1997-08-10  0:00 ` Matthew Heaney
1997-08-11  0:00   ` Robert Dewar
1997-08-12  0:00     ` Matthew Heaney
1997-08-13  0:00       ` Robert A Duff
1997-08-13  0:00         ` Matthew Heaney [this message]
1997-08-14  0:00           ` Robert A Duff
1997-08-14  0:00             ` Dale Stanbrough
1997-08-16  0:00           ` Robert Dewar
1997-08-16  0:00             ` Ken Garlington
1997-08-17  0:00               ` Robert Dewar
1997-08-18  0:00                 ` Robert A Duff
     [not found]                   ` <dewar.872433846@merv>
1997-09-03  0:00                     ` Robert A Duff
1997-09-06  0:00                       ` Robert Dewar
1997-09-08  0:00                         ` Robert A Duff
1997-08-17  0:00               ` Robert A Duff
1997-08-13  0:00       ` Ken Garlington
1997-08-13  0:00         ` Matthew Heaney
1997-08-10  0:00 ` Robert A Duff
replies disabled

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