]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c/c-typeck.c
fold-const.c (const_binop): Avoid performing the FP operation at compile-time...
authorRoger Sayle <roger@eyesopen.com>
Fri, 18 Jul 2003 00:26:51 +0000 (00:26 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Fri, 18 Jul 2003 00:26:51 +0000 (00:26 +0000)
commit3e4093b64f2e2623bba32e733e7e8f08efc700ac
tree3875a0446ee77a593d30fb10e6a14b62fcc0f4ec
parent35c77862c921a82a9d2bc4175dc041bd1e99e2bd
fold-const.c (const_binop): Avoid performing the FP operation at compile-time...

* fold-const.c (const_binop): Avoid performing the FP operation at
compile-time, if either operand is NaN and we honor signaling NaNs,
or if we're dividing by zero and either flag_trapping_math is set
or the desired mode doesn't support infinities.
(fold_initializer): New function to fold an expression ignoring any
potential run-time exceptions or traps.
* tree.h (fold_initializer): Prototype here.
* c-typeck.c (build_binary_op): Move to the end of the file so
that intializer_stack is in scope.  If constructing an initializer,
i.e. when initializer_stack is not NULL, use fold_initializer to
fold expressions.
* simplify-rtx.c (simplify_binary_operation): Likewise, avoid
performing FP operations at compile-time, if they would raise an
exception at run-time.

From-SVN: r69533
gcc/ChangeLog
gcc/c-typeck.c
gcc/fold-const.c
gcc/simplify-rtx.c
gcc/tree.h