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: a07f3367d7,834610f4f567e94b X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.86.133 with SMTP id p5mr1379094paz.12.1347409042357; Tue, 11 Sep 2012 17:17:22 -0700 (PDT) Path: t10ni13053187pbh.0!nntp.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsgate.cuhk.edu.hk!goblin3!goblin.stu.neva.ru!news.szaf.org!news.gnuher.de!news.enyo.de!.POSTED!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: Hi-Lite high integrity showcase and overflow errors Date: Tue, 04 Sep 2012 22:21:29 +0200 Message-ID: <878vcplet2.fsf@mid.deneb.enyo.de> References: <5045278b$0$6576$9b4e6d93@newsspool3.arcor-online.net> Mime-Version: 1.0 X-Trace: news.enyo.de 1346790089 11896 172.17.135.6 (4 Sep 2012 20:21:29 GMT) X-Complaints-To: news@enyo.de Cancel-Lock: sha1:HBv5ObKeYxcQJNUV6ZSK5WRNK2s= Content-Type: text/plain; charset=us-ascii Date: 2012-09-04T22:21:29+02:00 List-Id: * Georg Bauhaus: > Or am I just incorrectly assuming thing and X * Y will make the tools > complain fiercely about possible overflow? The base range of My_Int could be sufficiently large so that the multiplication wouldn't overflow, ever. In this regard, integer types aren't very portable. On your architecture, you might see different behavior if My_Int is defined like this: type My_Int is range 0 .. 40_000; And the check is performed against 40_000 as well. Eventually, you'll have to accept that a lot of Ada marketing material is poorly prepared at best, and downright intellectually dishonest at worst. This is rather sad.