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,583275b6950bf4e6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-25 14:12:56 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!wn12feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc51.ops.asp.att.net.POSTED!not-for-mail Message-ID: <3ED131BF.8040907@attbi.com> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Quality systems (Was: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)) References: <3ec4b1c9$1@news.wineasy.se> <3ECFF541.1010705@attbi.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.62.164.137 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc51.ops.asp.att.net 1053897175 24.62.164.137 (Sun, 25 May 2003 21:12:55 GMT) NNTP-Posting-Date: Sun, 25 May 2003 21:12:55 GMT Organization: AT&T Broadband Date: Sun, 25 May 2003 21:12:55 GMT Xref: archiver1.google.com comp.lang.ada:37769 Date: 2003-05-25T21:12:55+00:00 List-Id: Matthew Woodcraft wrote: > 3.5.4.9 would presumably need to change so that for unsigned types the > base range didn't include negative integers? No, what is wanted/needed is a non-standard integer type as defined in 3.5.4(26): "An implementation may provide nonstandard integer types, descendants of root_integer that are declared outside of the specification of package Standard, which need not have all the standard characteristics of a type defined by an integer_type_definition. For example, a nonstandard integer type might have an asymmetric base range or it might not be allowed as an array or loop index (a very long integer). Any type descended from a nonstandard integer type is also nonstandard. An implementation may place arbitrary restrictions on the use of such types; it is implementation defined whether operators that are predefined for ``any integer type'' are defined for a particular nonstandard integer type. In any case, such types are not permitted as explicit_generic_actual_parameters for formal scalar types -- see 12.5.2." This is under implementation permissions. In effect what I was doing was tweaking a few noses. This permission has always been "in there." Some compilers did provide explicit non-standard unsigned integer types in Ada 83, and in many Ada 83 compilers, System.Address was exactly such a type. But now in GNAT: type Address is mod Memory_Size; which is precisely correct on most hardware. Adding indexes wraps, and even when the index size is less than the address size, there is no sign extension. Are unsigned types required? I don't know. I know I have never had a use for them, but I have had and continue to have a need for modular types. I just don't see a conflict. The same thing goes for saturating arithmetic. There are cases where it is needed. But as far as I am concerned for integer, float, and fixed point types it is possible to create these by overriding the arithmetic operators. If they really are needed, I would expect to see users complaining about the inconveniences of the overriding approach, but I haven't seen that. I've seen wouldn't it be nice...