From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,47208e1e64e89fe0 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-10 08:44:39 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!uunet!sea.uu.net!ash.uu.net!world!news From: Robert A Duff Subject: Re: Null Record is not always Null User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Sender: news@world.std.com (Mr Usenet Himself) Message-ID: Date: Thu, 10 Oct 2002 15:44:02 GMT Content-Type: text/plain; charset=us-ascii References: <1b585154.0210100512.54af8543@posting.google.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Organization: The World Public Access UNIX, Brookline, MA Xref: archiver1.google.com comp.lang.ada:29673 Date: 2002-10-10T15:44:02+00:00 List-Id: 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