comp.lang.ada
 help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
Subject: Re: Hi-Lite high integrity showcase and overflow errors
Date: Wed, 03 Oct 2012 12:47:15 +0200
Date: 2012-10-03T12:47:15+02:00	[thread overview]
Message-ID: <87ehlfomrw.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: 9f990735-e6ca-43b3-9be5-930e8184626a@googlegroups.com

* yannick moy:

> Indeed, the possible overflow in line 7 (the test in Mult) can be
> raised at run-time, hence the overflow check failure when compiling
> with -gnato.

There's recent development in this area.

In FSF GCC trunk, there is now an overflow checking mode, enabled with
-gnato3, which causes the original program to behave as expected.  In
this mode, signed integer arithmetic does not result in intermediate
overflows, and comparisons between signed integers yield the
mathemtically defined result.  In some cases, this requires arbitrary
precision arithmetic at run time, but it really helps to avoid
Constraint_Error exceptions.



      parent reply	other threads:[~2012-10-03 10:47 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
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 [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox