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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!Xl.tags.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Tue, 10 Nov 2015 13:53:06 -0600 From: Dennis Lee Bieber Newsgroups: comp.lang.ada Subject: Re: GNAT and user-defined aspects and pragmas? Date: Tue, 10 Nov 2015 14:53:07 -0500 Organization: IISS Elusive Unicorn Message-ID: References: <87h9ku2dcp.fsf@adaheads.sparre-andersen.dk> X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 108.68.178.61 X-Trace: sv3-wVy88e437yzroQKAN7qv+Ach6jWVzcjGTnad8ri5+I2CMPbdZ3bbhadAqMT7X/yY/jlBKe7rDcByoKF!MmdOvQslbov/+qXVwVPGU+ONnLel9vW/G1wi7e1sfhkW9pF69jCa0YFIFnrY5XaH8uiCrcM5rQJu!/TFYNLFBU1Z6GY71R+Ygsek/E6M= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 3095 Xref: news.eternal-september.org comp.lang.ada:28286 Date: 2015-11-10T14:53:07-05:00 List-Id: On Tue, 10 Nov 2015 14:28:06 +0100, Jacob Sparre Andersen 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/