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-Thread: 103376,85c4b961f840b5ab X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!wns13feed!worldnet.att.net!207.217.77.102!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Zero length Objects References: <2kh2leF2ct4hU1@uni-berlin.de> <2kioovF2rj2qU1@uni-berlin.de> In-Reply-To: <2kioovF2rj2qU1@uni-berlin.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Fri, 02 Jul 2004 01:06:58 GMT NNTP-Posting-Host: 63.184.105.127 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.news.pas.earthlink.net 1088730418 63.184.105.127 (Thu, 01 Jul 2004 18:06:58 PDT) NNTP-Posting-Date: Thu, 01 Jul 2004 18:06:58 PDT Xref: g2news1.google.com comp.lang.ada:2038 Date: 2004-07-02T01:06:58+00:00 List-Id: Nick Roberts wrote: > As far as I am aware, the Ada standard permits types, subtypes, and > objects of zero size. I think that X'Size must return 0 if it has > been set to 0 (by a representation clause) for any subtype or object > X, but there is nothing in the standard to prevent objects of zero > size being allocated more than zero bits when they are allocated in > memory (and I gather this is what many compilers actually do). The 'Size of an object need not be the same as the subtype 'Size. For example, on many systems, Integer'Size = 32, Natural'Size = 31. For N : Natural; N'Size is usually 32. 31 comes into play in situations such as packed types. Similarly, for type Size_2 is (One, Two, Three, Four); for Size_2'Size use 2; S : Size_2; S'Size is usually 8. -- Jeff Carter "I'm a lumberjack and I'm OK." Monty Python's Flying Circus 54