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,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e01fe1b326df26d4,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!news.xtra.co.nz!53ab2750!not-for-mail From: "Lurker" Newsgroups: comp.lang.ada Subject: Division by zero X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Message-ID: Date: Sun, 12 Jun 2005 09:03:35 +1200 NNTP-Posting-Host: 219.88.85.199 X-Complaints-To: abuse@xtra.co.nz X-Trace: news.xtra.co.nz 1118523686 219.88.85.199 (Sun, 12 Jun 2005 09:01:26 NZST) NNTP-Posting-Date: Sun, 12 Jun 2005 09:01:26 NZST Organization: Xtra Xref: g2news1.google.com comp.lang.ada:11288 Date: 2005-06-12T09:03:35+12:00 List-Id: Hi, I'm curios about the problem which I discovered by accident. The code below is of course very much reduced to show the it: function x(a: integer) return integer is some_constant: constant := 0; begin -- return 1/some_constant; -- line 1 -- return a/some_constant; -- line 2 end; If line 1 is uncommented compiler (Gnat 3.15 for Widows) produces the expected error about division by zero. If line 2 is uncommented it passes compilation with no problem. Surely that's not right? Or did I miss something?