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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9b7d3a51d0d8b6ee X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn13feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: Extending discriminant types Reply-To: no to spamers (No@email.given.org) References: <20081115101632.5f98c596@cube.tz.axivion.com> <4d75603c-2f61-46c9-8c62-df4b6f49b2f7@13g2000yql.googlegroups.com> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Fri, 21 Nov 2008 22:31:14 GMT NNTP-Posting-Host: 12.64.240.87 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1227306674 12.64.240.87 (Fri, 21 Nov 2008 22:31:14 GMT) NNTP-Posting-Date: Fri, 21 Nov 2008 22:31:14 GMT Organization: AT&T Worldnet Xref: g2news2.google.com comp.lang.ada:3717 Date: 2008-11-21T22:31:14+00:00 List-Id: >So please accept that if some compilers accept 'Base, this is a >mistake! And to Ludovic Brenta: This type of statement works with GNAT-3.15p, even in GNAT-3.01 as well as GNAT-3.12. All which are GNAT compilers that use the Ada 95 specification. That's just too many compilers and programmers testing for Adacore over a period of 5 to 10 years to be a design flaw in one version of a compiler. And that does not include the 100s to 1000s of GCC people and students with the general public added in that have tested possible every combination of every type of statement (may be to general but you get the idea). The odds that this type of statement not being found until now and at least written up, is astronautical. So, until there is a second and possible a third compiler that is not based on Adacore GNAT, such as the "IBM Ada" compiler based on the Ada 2005 specs, that states this is an error! I have to say "No!" I will not accept this type of statement as an error. Also if you wanted a ACATS test you could just modify one of the code I posted to fit the ACATS design test structure. >So there is nowhere a statement that 'Base may exist for other types. But there is no place it say that it can not exist either! It up to the programmer! Plus "Base" is not a reserved word so it can be use in other places. >Implementations may define other attributes, but they are not allowed >to use attribute names defined in the standard. Disprove by example RM 13.13 (84) function My_Read(Stream : access Ada.Streams.Root_Stream_Type'Class) return T; for T'Read use My_Read; -- see 13.13.2 Where the standard "Read" attribute is reassigned. In GNAT you are limited to the standard attributes only and that attribute structural definition but you can reassign them to user's code. Also, If you are correct it would of been listed in "RM Annex J" since it is valid under the Ada 83 specs. In <4d75603c-2f61-46c9-8c62-df4b6f49b2f7@13g2000yql.googlegroups.com>, Ludovic Brenta writes: >On Nov 21, 8:25 am, a...@anon.org (anon) wrote: >> Adam, >> >> Try an explain this. Since I downloaded my binary version of GNAT-3.15p >> direct from Adacore. And someone else has said the GNAT-3.15p is old but >> it has been fully tested and found to be correct. So, that means that time >> Adacore agreed that "Base" attribute could be used outside of scalars and >> that was years after the RM and AARM for Ada 95 was written. > >Your reasoning is incorrect because (a) it is impossible to "fully >test" a program as complex as a compiler and (b) testing can prove the >presence of bugs but not their absence. Therefore, even though GNAT >3.15p did pass the ACATS and many thousands of tests beyond the ACATS, >you may not assume that it contains no bugs. In fact, during my years >maintaining GNAT 3.15p in Debian, various people reported >approximately 110 bugs in it. A few of these bugs are still present in >the latest releases of GNAT; yet, the ACATS does not find them. > >It would be nice to add a test to the ACATS so that compilers that >accept T'Base where T is non-scalar get rejected. > >-- >Ludovic Brenta.