This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Compile-time floating-point expressions and subsequent detection of possible overflows etc -- during the compile-time stage.
On 2011-11-02 09:37:23 +0000, Andrew Haley wrote:
> On 11/02/2011 09:01 AM, Vincent Lefevre wrote:
> > In ISO C99, I don't think the compiler is allowed to replace a
> > floating expression with an underflow or overflow by its result
> > at compile time.
>
> But surely the "as if" rule applies here: if no conforming program
> can tell the difference, a transformation is allowed.
Why couldn't conforming programs tell the difference???
--
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)