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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,a27864f6019f6e7f X-Google-Attributes: gid103376,public From: Vincent Marciante Subject: Re: Simpler Question (was Assigning to dereferenced null access variable) Date: 2000/11/07 Message-ID: <3A089948.5979@li.net>#1/1 X-Deja-AN: 691009288 Content-Transfer-Encoding: 8bit References: <3A05A609.4CE6@li.net> <3A0847ED.49AF@li.net> <8u9r97$jmb$2@wanadoo.fr> Content-Type: text/plain; charset=iso-8859-1 X-Complaints-To: abuse@verio.net X-Trace: iad-read.news.verio.net 973642042 209.139.0.141 (Wed, 08 Nov 2000 00:07:22 GMT) Organization: Verio MIME-Version: 1.0 NNTP-Posting-Date: Wed, 08 Nov 2000 00:07:22 GMT Newsgroups: comp.lang.ada Date: 2000-11-07T00:00:00+00:00 List-Id: Jean-Pierre Rosen wrote: > > "Vincent Marciante" a �crit dans le message news:3A0847ED.49AF@li.net... > >[...] > > begin > > Null_Sequence.The_Characters(1..0) := Null_Characters; > > Put_Line("The Null_Characters assignment succeeded"); > > exception > > when Constraint_Error => > > Put_Line("The Null_Characters assignment caused > > Constraint_Error"); > > --OS/2 GNAT 3.12 raises Constraint_Error > > end; > > end; > Null_Sequence.The_Characters is a null pointer, there is no array to point to. This is what causes Constraint_Error, nothing to do > with the assignment. > > -- > --------------------------------------------------------- > J-P. Rosen (Rosen.Adalog@wanadoo.fr) > Visit Adalog's web site at http://pro.wanadoo.fr/adalog I thought that null_sequence.the_characters being a null pointer should always cause constraint_error. I will assume that you mean that the fact that no constraint_error ocurred in the first block (repeated below) indicates a compiler defect, so, I will send a report to ACT. Thanks. begin Null_Sequence.The_Characters(1..0) := Null_Characters(1..0); Put_Line("The Null_Characters(1..0) assignment succeeded"); --OS/2 GNAT 3.12 succeeds exception when Constraint_Error => Put_Line("The Null_Characters(1..0) assignment caused Constraint_Error"); end;