From: Shark8 <onewingedshark@gmail.com>
Subject: Re: Hi-Lite high integrity showcase and overflow errors
Date: Tue, 4 Sep 2012 14:24:52 -0700 (PDT)
Date: 2012-09-04T14:24:52-07:00 [thread overview]
Message-ID: <75dd01c2-0b05-4df0-8425-c4848733d819@googlegroups.com> (raw)
In-Reply-To: <878vcplet2.fsf@mid.deneb.enyo.de>
On Tuesday, September 4, 2012 2:21:30 PM UTC-6, Florian Weimer wrote:
> * 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.
Right; both checks are needed.
> 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.
It is. Of course I think it'd be a lot nicer if the material were commented 'like' my presented code (i.e. problem and solution described) -- simply describing what's happening can reveal a lot of problems that you never thought about initially.
next prev parent reply other threads:[~2012-09-04 21:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-03 21:56 Hi-Lite high integrity showcase and overflow errors Georg Bauhaus
2012-09-04 2:53 ` Shark8
2012-09-04 3:05 ` Shark8
2012-09-04 8:30 ` Georg Bauhaus
2012-09-04 18:45 ` Shark8
2012-09-04 20:21 ` Florian Weimer
2012-09-04 21:24 ` Shark8 [this message]
2012-09-05 9:25 ` yannick.moy
2012-09-05 9:19 ` yannick.moy
2012-09-05 11:15 ` Georg Bauhaus
2012-10-03 10:47 ` Florian Weimer
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox