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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,139d9b90ab37c0e5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-26 05:15:46 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed1.bredband.com!bredband!newsfeed.bahnhof.se!news-stob.telia.net!news-sto.telia.net!194.22.194.4.MISMATCH!masternews.telia.net.!newsb.telia.net.POSTED!not-for-mail From: "Peter Hend�n" Newsgroups: comp.lang.ada References: <3BD91EF8.EEB7EDBA@systems.saab.se> Subject: Re: When to do a constraint check and not ?? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: Date: Fri, 26 Oct 2001 12:01:19 GMT NNTP-Posting-Host: 213.67.175.183 X-Complaints-To: abuse@telia.com X-Trace: newsb.telia.net 1004097679 213.67.175.183 (Fri, 26 Oct 2001 14:01:19 CEST) NNTP-Posting-Date: Fri, 26 Oct 2001 14:01:19 CEST Organization: Telia Internet Xref: archiver1.google.com comp.lang.ada:15229 Date: 2001-10-26T12:01:19+00:00 List-Id: "Per Sandberg" wrote: > procedue bla is > b : boolean; --< B may contain any bit pattern at this point. > procedure test( p : in out boolean ) is > begin > b := false; > end test; > begin > test(b); --<< Is the compiler allowed to insert a constraint check on b > here ?? > end; > Is the answer that it is up to the wendor. > I did not get any clues from the LRM. The main clues are in 3.3.1, 13.9.1 and H.1 of ARM. There are some comments in the same sections of the AARM. My interpretation: The compiler is allowed, but not required, to raise Constraint_Error or Program_Error exactly at (before) the call to test in your example. I'd be happy to hear from anyone more knowledgable than me on this, even if my Coding Rules would still be to require initialization of all objects at the earliest possible place, ie. normally at declaration. Regards, Peter Hend�n -- Peter Hend�n http://www.algonet.se/~phenden ICQ: 14672398 Teknisk Dokumentation AB http://www.tdab.com