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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e01fe1b326df26d4 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.tiscali.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!news.arcor.de!not-for-mail Date: Mon, 13 Jun 2005 00:53:55 +0200 From: Georg Bauhaus Organization: Home User-Agent: Debian Thunderbird 1.0.2 (X11/20050331) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Division by zero References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <42aca05a$0$24379$9b4e6d93@newsread2.arcor-online.net> NNTP-Posting-Date: 12 Jun 2005 22:51:38 MEST NNTP-Posting-Host: d996716d.newsread2.arcor-online.net X-Trace: DXC=`M?jl541iQRC3N6I?YBjS[Q5U85hF6f;TjW\KbG]kaMXea\9g\;7NmUeNUfCj00khWhP3YJKgE\j\Y=3KY7lMo]Y X-Complaints-To: abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:11302 Date: 2005-06-12T22:51:38+02:00 List-Id: Lurker wrote: > function x(a: integer) return integer is ... > -- return a/some_constant; -- line 2 > > end; > If line 2 is uncommented it passes compilation with no problem. > > Surely that's not right? Or did I miss something? You could request more warnings: $ gnatgcc -c -gnatv -gnatwa x.adb GNAT 3.4.4 20050314 (prerelease) (Debian 3.4.3-13) Copyright 1992-2004 Free Software Foundation, Inc. Compiling: x.adb (source file time stamp: 2005-06-12 22:47:07) 9. return a/some_constant; -- line 2 | >>> warning: division by zero >>> warning: "Constraint_Error" will be raised at run time 15 lines: No errors, 2 warnings