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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.129.49.204 with SMTP id x195mr6913447ywx.45.1465065335198; Sat, 04 Jun 2016 11:35:35 -0700 (PDT) X-Received: by 10.157.11.135 with SMTP id 7mr123437oth.17.1465065335138; Sat, 04 Jun 2016 11:35:35 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!au2pb.net!feeder.erje.net!2.us.feeder.erje.net!newspeer1.nac.net!border2.nntp.dca1.giganews.com!nntp.giganews.com!p34no2609222qgp.1!news-out.google.com!107ni123qgx.1!nntp.google.com!p34no2609219qgp.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 4 Jun 2016 11:35:34 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=92.106.1.167; posting-account=gRqrnQkAAAAC_02ynnhqGk1VRQlve6ZG NNTP-Posting-Host: 92.106.1.167 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1fbfa584-efcf-4e2c-9035-728cec528754@googlegroups.com> Subject: Re: fyi, GNAT and SPARK GPL 2016 are out From: gautier_niouzes@hotmail.com Injection-Date: Sat, 04 Jun 2016 18:35:35 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:30604 Date: 2016-06-04T11:35:34-07:00 List-Id: Le samedi 4 juin 2016 18:31:29 UTC+2, Georg Bauhaus a =C3=A9crit=C2=A0: > Doesn't your workaround demonstrate just how the behavior > shown by GNAT contradicts the one to expect from standards > conformance? Or is -gnatp now overruling the effect which >=20 > Element (No_Element) >=20 > is supposed to have? Indeed. Without pragma Suppress(Container_Checks) you get the RM05/12 behav= ior: raised CONSTRAINT_ERROR : Test_2016.T_Dic.Element: Position cursor of funct= ion Element equals No_Element (A.18.4 Maps: 33/2 function Element (Position : Cursor) return Element_Type; 34/2 If Position equals No_Element, then Constraint_Error is propagated. Otherwi= se, Element returns the element component of the node designated by Positio= n.) with pragma Suppress(Container_Checks) (or with -gnatp) you get raised PROGRAM_ERROR : EXCEPTION_ACCESS_VIOLATION No coincidence, since you have in a-cohama.adb (GPL 2016 version): function Element (Position : Cursor) return Element_Type is begin if Checks and then Position.Node =3D null then raise Constraint_Error with "Position cursor of function Element equals No_Element"; end if; ... and (one click away): Checks : constant Boolean :=3D Container_Checks'Enabled; Hence my question about Container_Checks being in a future version of the s= tandard... _________________________=20 Gautier's Ada programming=20 http://sf.net/users/gdemont/