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,13f10cac2d21b84f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-29 19:44:32 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: Is this a GNAT bug??? Date: 29 Apr 2002 19:44:31 -0700 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0204291844.21d7f5f0@posting.google.com> References: <3CC992D6.A87A3443@raytheon.com> NNTP-Posting-Host: 205.232.38.244 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1020134672 21071 127.0.0.1 (30 Apr 2002 02:44:32 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 30 Apr 2002 02:44:32 GMT Xref: archiver1.google.com comp.lang.ada:23251 Date: 2002-04-30T02:44:32+00:00 List-Id: robert_s_quinn@yahoo.com (Robert Quinn) wrote in message news:... > Mark Johnson wrote in message news:<3CC992D6.A87A3443@raytheon.com>... > Yes, the alignment is 1. This doesn't make sense to me. Why can I > specify any size I want, up to size 64, but arrays over 64 bits have > to have a size as a multiple of 8? What is so special about 64 bits > or less? The language of rep clauses allows you to specify all sorts of things that might not actually be allowed by a given compiler, e.g. type r is range 0 .. 1; for r'size use 999999999999999999999; for q'alignment use 43; for l'component'size use 83; So the question is what set of rep clauses is implemented by a given compiler. If you have an annex C compliant compiler, then there is a certainly well defined subset which must be implemented. By staying within this subset you achieve greater portability. Once you stray outside this subset, you are writing non-portable code that is implementation dependent. It does not mean that your code is nonsense, just that it may not be implemented. No two compilers have exactly the same set of allowed rep clauses. For instance in comparing VADS and GNAT, there are clauses that VADS accepts that GNAT does not (you identify one such in your message), and there are many clauses that GNAT accepts that VADS does not (including all the new Ada 95 stuff :-) Now if you are asking specifically in this case why GNAT does not implement the non-portable rep clause you wish to use, the answer is that we can't implement everything, so we implement what is most useful to our customers, considered against the implementation cost. If you were a customer of ACT, and willing to pay for this feature to be added, no doubt ACT could be persuaded to accomodate you :-) If your legacy code depends on particular rep clauses being supported, then you had better pick a compiler that supports them. In fact GNAT supports almost all the rep clauses supported by VADS precisely because we have many customers who have converted legacy VADS code to GNAT. It just turns out that this particular case has not arisen in a significant manner. Robert Dewar Ada Core Technologies