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!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: Tero Koskinen Newsgroups: comp.lang.ada Subject: Re: Accessibility and possible Gnat bug Date: Fri, 19 Dec 2014 19:34:16 +0200 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: NNTP-Posting-Host: 188-67-213-140.bb.dnainternet.fi Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: loke.gir.dk 1419010459 25163 188.67.213.140 (19 Dec 2014 17:34:19 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 19 Dec 2014 17:34:19 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:24154 Date: 2014-12-19T19:34:16+02:00 List-Id: 19.12.2014, 17:35, Michael B. kirjoitti: > In the previous discussion about accessibility I was pointed to the > paper "Accessibility rules OK!" of John Barnes (ACM SIGAda Ada Letters > Volume XV Issue 1, Jan./Feb. 1995) which contains the following example: > > procedure Example6 is ... > P1(Z'Access); -- Raises Program_Error. ... > end Example6; > > In the paper the program is expected to run without errors. > I compiled it with Gnat 4.9 on Debian 8.0, ran it and got an > Program_Error on the marked line. > > Is this correct in Ada 2012 or not? I would like to hear your opinion > about that before I write a possibly unnecessary bug report to AdaCore. I don't know what the standard actually says, but Irvine ICCAda generates executable, which does not raise exception when the code is compiled in Ada 2005 mode. Also, Janus/Ada generates executable, which does not raise exception, when Janus/Ada uses Ada 95 mode. GNAT GPL 2013 always generates executable, which raises exception. (Tested with -gnat95 and -gnat2012 flags). Yours, Tero