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 2002:a24:1311:: with SMTP id 17mr1413510itz.20.1549956489691; Mon, 11 Feb 2019 23:28:09 -0800 (PST) X-Received: by 2002:a9d:5e01:: with SMTP id d1mr50826oti.1.1549956489409; Mon, 11 Feb 2019 23:28:09 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!k10no110440itk.0!news-out.google.com!v141ni294ita.0!nntp.google.com!q69no111130itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 11 Feb 2019 23:28:09 -0800 (PST) In-Reply-To: <17375128-e016-4366-91ff-cd68f74689b3@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=185.34.132.4; posting-account=Srm5lQoAAAAEMX9rv2ilEKR6FDPapmSq NNTP-Posting-Host: 185.34.132.4 References: <21f5f1ca-eabe-4ce6-9ee0-5d308d7676ff@googlegroups.com> <17375128-e016-4366-91ff-cd68f74689b3@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: GNAT proposal: note on implicit exceptions insertion From: Mark Lorenzen Injection-Date: Tue, 12 Feb 2019 07:28:09 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:55498 Date: 2019-02-11T23:28:09-08:00 List-Id: On Monday, February 11, 2019 at 10:36:56 PM UTC+1, Jesper Quorning wrote: > I would like a note from GCC when a there is an implicit (hidden) excepti= on rise like array bunds checking. > It would be a simple way of inspecting your quality of code. For instance= if there is array bunds checks in a loop I may like to rewrite/design a pa= rt of the program. Do you have som example code at hand? If so, please try and compile it with= pragma Restrictions (No_Exception_Propagation) is in effect and switch -gn= atw.x (yes including the dot and x). I have used this to find all places in= the code, where a run-time error could be raised. It is not an optimal sol= ution due to the pragma and possible local exception handlers, but could gi= ve an idea of what GNAT is already capable of. Mark L