From: Simon Wright <simon@pushface.org>
Subject: Re: Odd overflow exception being raised in one-line program
Date: Wed, 30 Jan 2013 10:15:23 +0000
Date: 2013-01-30T10:15:23+00:00 [thread overview]
Message-ID: <ly8v7bt1s4.fsf@pushface.org> (raw)
In-Reply-To: 8259d65f-4b81-49d2-b1a0-613072c6b0fe@googlegroups.com
Jerry <lanceboyle@qwest.net> writes:
> A user of the PLplot plotting package, using Ada bindings, has
> reported an overflow exception that has not occurred before. He
> reports using Fedora rawhide which uses gcc 4.8. He reported the
> conditions surrounding the exception and I used that to make the
> following program and asked him to report his results. Line 7 of the
> below program mimics a line in the Ada binding to which his exception
> points.
> r := Integer((r1 * 255.001) - 0.499999999999999);
> raised CONSTRAINT_ERROR : Test_Overflow.adb:7 overflow check failed
> I investigated other places (18 total) where he is getting an
> "overflow check failed" exception. In every case, the indicated line
> contains a conversion from Long_Float to Integer using the Integer( )
> function with a Long_Float argument. It appears very likely that the
> exception is happening at every attempt to make such a conversion.
>
> What am I missing here?
Well, GCC 4.8 hasn't been released yet! but a quick check through the
bugs/regressions doesn't show anything like this. Let's hope it doesn't
make it to the release ..
Neither GCC 4.7.0 nor GNAT GPL 2012 shows the problem.
next prev parent reply other threads:[~2013-01-30 10:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-30 3:49 Odd overflow exception being raised in one-line program Jerry
2013-01-30 10:15 ` Simon Wright [this message]
2013-01-30 23:37 ` Randy Brukardt
2013-01-31 7:37 ` Jerry
2013-01-31 20:44 ` Simon Wright
2013-02-01 3:25 ` Jerry
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox