comp.lang.ada
 help / color / mirror / Atom feed
From: Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject: Re: GNAT and user-defined aspects and pragmas?
Date: Tue, 10 Nov 2015 14:53:07 -0500
Date: 2015-11-10T14:53:07-05:00	[thread overview]
Message-ID: <avh44b101hm5erus5s1tssc6ef7tj2g1qn@4ax.com> (raw)
In-Reply-To: 87h9ku2dcp.fsf@adaheads.sparre-andersen.dk

On Tue, 10 Nov 2015 14:28:06 +0100, Jacob Sparre Andersen <sparre@nbi.dk>
declaimed the following:

>I wanted to experiment a bit with user-defined aspects to see how far
>GNAT takes LRM 13.1.1(38/3).
>
	I see nothing in that paragraph which suggests anything of a "user
defined" capability.  

>GNAT GPL 2014 (20140331) accepts certain implementation-defined aspects
>(such as "SPARK_Mode"), but it doesn't accept user-defined aspects.

	38.a/3 explicitly states that unrecognized aspects are illegal. Between
the two, one gets the impression that if one uses aspects beyond those
defined by the language reference -- ie; using implementation defined
aspects -- one accepts that the result is not portable.

>
>Unlike this, pragmas don't have to be known by the compiler in advance
>to be accepted by GNAT (but you do get a warning if the pragmas aren't
>recognised).
>
	From the beginning (back in the days of mil-std 1815) pragmas were,
loosely, suggestions to the compiler -- they were not supposed to have any
effect on the correctness of a program (for example, Inline -- the program
should produce the same final result when executed whether a function was
inlined or not).

	I'll confess I've not studied the manuals (given that my current
employment is using Ada 83, and my previous employment was Ada 95) so I'm
not fully up on the last two significant change sets -- but I have the
impression that aspects have a higher significance: they are things that
must be done, not suggestions of things the programmer would like to have
done (pragmas). As a result, feeding one to a compiler, when it is not
known to that compiler, is an error.

>+ Why this difference?
>
>+ Is it different in GNAT GPL 2015?  (I haven't gotten around to install
>  it yet.)
>
>+ Will it be different in GNAT GPL 2016?
>
>Greetings,
>
>Jacob
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/


  reply	other threads:[~2015-11-10 19:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10 13:28 GNAT and user-defined aspects and pragmas? Jacob Sparre Andersen
2015-11-10 19:53 ` Dennis Lee Bieber [this message]
2015-11-11  9:29   ` Jacob Sparre Andersen
2015-11-12 19:24     ` Randy Brukardt
2015-11-12 20:37       ` Shark8
2015-11-12 21:42         ` Randy Brukardt
2015-11-13 10:03       ` J-P. Rosen
2015-11-11 11:14   ` Simon Wright
2015-11-12 19:27     ` Randy Brukardt
2015-11-13  8:51       ` J-P. Rosen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox