From: Keith Thompson <kst@cts.com>
Subject: Re: very specific question on Ada syntax
Date: 01 Feb 2001 01:21:28 -0800
Date: 2001-02-01T01:21:28-08:00 [thread overview]
Message-ID: <yec66iuahd3.fsf@king.cts.com> (raw)
In-Reply-To: 95avh2$ua7$1@nnrp1.deja.com
Robert Dewar <robert_dewar@my-deja.com> writes:
> In article <mailman.981007013.11542.comp.lang.ada@ada.eu.org>,
> 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 <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
MAKE MONEY FAST!! DON'T FEED IT!!
next prev parent reply other threads:[~2001-02-01 9:21 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-01 5:52 very specific question on Ada syntax Christoph Grein
2001-02-01 6:25 ` Robert Dewar
2001-02-01 9:21 ` Keith Thompson [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-02-02 5:53 Christoph Grein
2001-02-01 11:10 Christoph Grein
2001-02-01 17:58 ` Robert Dewar
2001-02-01 7:14 Christoph Grein
2001-01-31 5:01 Christoph Grein
2001-01-31 6:02 ` Robert Dewar
2001-01-30 9:30 Christoph Grein
2001-01-30 7:19 Jean-Pierre Rosen
2001-01-30 6:28 Christoph Grein
2001-01-30 7:16 ` Jean-Pierre Rosen
2001-01-30 16:25 ` Mario Amado Alves
2001-01-30 17:57 ` Robert Dewar
2001-01-30 19:16 ` Ted Dennison
2001-01-31 6:16 ` Robert Dewar
2001-01-31 11:40 ` Mario Amado Alves
2001-01-31 22:09 ` Florian Weimer
2001-02-01 5:39 ` Robert Dewar
2001-02-01 5:39 ` Robert Dewar
2001-02-04 14:24 ` Florian Weimer
2001-02-01 5:38 ` Robert Dewar
2001-02-01 18:24 ` Mario Amado Alves
2001-02-02 3:52 ` Robert Dewar
2001-01-30 19:06 ` Ted Dennison
2001-01-31 6:18 ` Robert Dewar
2001-01-30 18:41 ` Robert Dewar
[not found] <mailman.980516658.10759.comp.lang.ada@ada.eu.org>
[not found] ` <94s4vm$qr4$1@nnrp1.deja.com>
2001-01-26 20:26 ` Florian Weimer
2001-01-28 0:28 ` Robert Dewar
2001-01-30 8:47 ` Florian Weimer
2001-01-30 18:35 ` Robert Dewar
2001-01-30 22:16 ` Florian Weimer
2001-01-31 6:10 ` Robert Dewar
2001-01-31 13:29 ` Florian Weimer
2001-01-31 14:40 ` Marc A. Criley
2001-01-26 22:43 ` Paul Graham
2001-01-28 0:32 ` Robert Dewar
[not found] <200101261211.NAA13016@bulgaria.otn.eurocopter.de>
2001-01-26 17:17 ` Mario Amado Alves
2001-01-28 0:36 ` Robert Dewar
2001-01-29 11:11 ` Mario Amado Alves
2001-01-29 15:55 ` Ted Dennison
2001-01-29 16:41 ` Ted Dennison
2001-01-29 17:52 ` Mario Amado Alves
2001-01-30 6:26 ` Robert Dewar
[not found] <B6A1A9B09E52D31183ED00A0C9E0888C4699C9@nctswashxchg.nctswash.navy.mil>
[not found] ` <mailman.980504596.2748.comp.lang.ada@ada.eu.org>
2001-01-26 16:17 ` Paul Graham
2001-01-26 16:38 ` Robert Dewar
2001-01-30 16:45 ` Tucker Taft
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox