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,6d9eb594a33cb947 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-01 01:22:34 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!news.iac.net!news-out.cwix.com!newsfeed.cwix.com!news-hog.berkeley.edu!ucberkeley!newshub.sdsu.edu!209.68.192.203!ragnarok.cts.com!thoth.cts.com!not-for-mail From: Keith Thompson Newsgroups: comp.lang.ada Subject: Re: very specific question on Ada syntax Date: 01 Feb 2001 01:21:28 -0800 Organization: CTSnet Internet Services Sender: kst@king.cts.com Message-ID: References: <95avh2$ua7$1@nnrp1.deja.com> NNTP-Posting-Host: king.cts.com X-Trace: thoth.cts.com 981019288 85870 209.68.192.180 (1 Feb 2001 09:21:28 GMT) X-Complaints-To: abuse@cts.com NNTP-Posting-Date: Thu, 1 Feb 2001 09:21:28 +0000 (UTC) X-Newsreader: Gnus v5.5/Emacs 20.3 Xref: supernews.google.com comp.lang.ada:4807 Date: 2001-02-01T01:21:28-08:00 List-Id: Robert Dewar writes: > In article , > comp.lang.ada@ada.eu.org wrote: > > Florian Weimer wrote: > > > > > A character literal is a prefix, taking attributes is > allowed. In > > > contrast, a string literal is not a prefix, see RM 4.1(2) > and 4.1.4. > > > > Compiling the following with Gnat 3.13p gives: > > > > package P is > > > > type T is ('a', None, 'Z'); > > type F_T is access function return T; > > > > X: F_T := 'a''Access; > > Y: F_T := None'Access; > > > > end P; > > > > 6. X: F_T := 'a''Access; > > | > > >>> prefix of "Access" attribute must be aliased > > > > Is this then a bug? > > No, this is obviously a correct error message. What would > make you think that this particular usage was legal? I think the error message would be clearer if it said that the prefix must not be an intrinsic subprogram. RM95-6.3.1 says that the calling convention for an enumeration literal is Intrinsic; 3.10.2 says that the Access attribute cannot be applied to an intrinsic subprogram. One source of confusion is that GNAT doesn't complain about None'Access; presumably this is a bug. I don't have a recent version of Gnat installed, so I'll let someone else submit a bug report (unless it's already been fixed). -- Keith Thompson (The_Other_Keith) kst@cts.com San Diego Supercomputer Center <*> MAKE MONEY FAST!! DON'T FEED IT!!