comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Null Record is not always Null
Date: Thu, 10 Oct 2002 15:44:02 GMT
Date: 2002-10-10T15:44:02+00:00	[thread overview]
Message-ID: <wccit0apad9.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: slrnaqb2uj.of3.Colin_Paul_Gloster@camac.dcu.ie

Colin_Paul_Gloster@ACM.org (Colin Paul Gloster) writes:

> Peter Richtmyer posted different behavior on three compilers and said:
> "Don't know if there is a "right" result, or is this one of 
> those gray areas. Anybody?"
> 
> Well, though 13.12 re pragmas has:
> 
> "[..]
> 
> An implementation may place limitations on the values of the expression
> that are supported, and limitations on the supported combinations of
> restrictions. The
> consequences of violating such limitations are implementation defined.

13.12 is not talking about pragmas in general.  It is talking about
pragma Restrictions, so this quote is irrelevant.

> a pragma should never stop a compilation.

Right -- compilers should never crash.

> As for the rest, clearly you were given suboptimal results for your
> possibly wacky null record but compilers are allowed to ignore your
> requests:
> 
> "[..]
> 
> [..] A representation or operational item that is not supported by the
> implementation is illegal, [..]
> 
> An implementation may interpret aspects of representation in an
> implementation-defined manner. An implementation may place
> implementation-defined restrictions
> on representation items. [..]" (13.1).

Yes, but you also have to look at all the "Recommended Levels of
Support" (which are *requirements* if the compiler supports the SP
annex), and see if it talks about 'Size of null records.  It doesn't,
but it does talk about 'Size of things like "range 0..-1".

> In 13.3 is "nonnegative" chosen to denote >0 or >=0?

Zero is not negative.
But it's pretty close.  ;-)

By the way, it would be helpful if you specified paragraph numbers when
referring to the RM, as in 13.3(48) for this paragraph:

> "[..]
> 
> Size may be specified for stand-alone objects via an
> attribute_definition_clause; the expression of such a clause shall be
> static and its value nonnegative.
> 
> [..]"

So this means that a compiler cannot support "for T'Size use -1;",
but it *can* support "for T'Size use 0;".  You have to look at the
Recommended Levels of Support to see whether it's *required* to support
"... use 0".

- Bob



  reply	other threads:[~2002-10-10 15:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-10 13:12 Null Record is not always Null Peter Richtmyer
2002-10-10 14:16 ` Colin Paul Gloster
2002-10-10 15:44   ` Robert A Duff [this message]
2002-10-10 16:44     ` Colin Paul Gloster
2002-10-10 17:28       ` Robert A Duff
2002-10-22 19:00       ` Randy Brukardt
2002-10-10 15:38 ` Robert A Duff
2002-10-11  1:39   ` Peter Richtmyer
replies disabled

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