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!news1.google.com!news.glorb.com!news2!wn13feed!worldnet.att.net!bgtnsc04-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> <20081122011825.5354d1c1@cube.tz.axivion.com> <4928ecad$0$32681$9b4e6d93@newsspool2.arcor-online.net> <648Wk.39330$_Y1.32087@bgtnsc05-news.ops.worldnet.att.net> <492a7d07$0$30236$9b4e6d93@newsspool1.arcor-online.net> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Mon, 24 Nov 2008 22:16:52 GMT NNTP-Posting-Host: 12.64.198.174 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1227565012 12.64.198.174 (Mon, 24 Nov 2008 22:16:52 GMT) NNTP-Posting-Date: Mon, 24 Nov 2008 22:16:52 GMT Organization: AT&T Worldnet Xref: g2news2.google.com comp.lang.ada:3746 Date: 2008-11-24T22:16:52+00:00 List-Id: Even if you delete the "tagged" word it reject that statement if you use "-gnat83", in either version in both GNAT-3.15p or GNAT GPL 2007. But as Adam and others have stated this is suppose to be legal in 83 only. In checking with the Ada RM 83 and "DEC LRM 83. the Base was a concept only not a usable attribute, which is also stated in book "Ada Problem Solving and Program Design", 1990. The "Base" attribute was introduce and added to the list of predefine attribute in the Ada 95 specs. That makes the paragraph that Adam listed from the AARM in Error. gnat compile -gnat83 u.adb gcc -c -gnat83 u.adb u.ads:4:33: (Ada 83) Base attribute not allowed in subtype mark compilation abandoned due to previous error gnatmake: "u.adb" compilation error package U is type T is private ; -- Replacing T with Integer will still result in an error -- for the 83 specs. Because Base is not an attribute -- in Ada 83. function "=" ( Left, Right : T'Base ) return Boolean ; private type T is null record ; end U ; -- -- Dummy body package to comply with the specification package. -- package body U is function "=" ( Left, Right : T'Base ) return Boolean is begin return False ; end ; end U ; In <492a7d07$0$30236$9b4e6d93@newsspool1.arcor-online.net>, Georg Bauhaus writes: >anon schrieb: >> Georg Bauhaus >> >> Actually on the 20th you stated this: >> >> quote: >> GNAT has -gnat83 as well, but rejects, too, because there are >> neither tagged nor abstract types in Ada 83. >> unquote: > >As I stated in parts missing from your quote, the compiler >rejects. But it rejects because of the presence of "tagged" >and "abstract", as it should. Not becuase of 'Base. > >Again, this is easiest to see by actually trying the code >with any of the mentioned editions of GNAT, and -gnat83.