re PR c/14649 (atan(1.0) should not be a constant expression)
authorRoger Sayle <roger@eyesopen.com>
Mon, 7 Jun 2004 18:49:36 +0000 (18:49 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Mon, 7 Jun 2004 18:49:36 +0000 (18:49 +0000)
commitbf730f15c50fab842ac222b8e60d62737d5f0d9a
tree15790a9a0fa2a93d8ffe3c058372c43f8aef3c20
parentcb6231728e5b5cd61ef549354378252bfa92aabb
re PR c/14649 (atan(1.0) should not be a constant expression)

PR c/14649
* c-typeck.c (require_constant_value, require_constant_elements):
Move declarations to the top of the file.
(build_function_call): If we require a constant value, fold with
fold_initializer.  If the result is a constant, and the function
wasn't called using __builtin_foo, issue a pedantic warning.
(build_unary_op): If we require a constant value, fold tree with
fold_initializer.
(build_binary_op): Use require_constant_value to determine whether
to call fold or fold_initializer.

* gcc.dg/pr14649-1.c: New test case.

From-SVN: r82705
gcc/ChangeLog
gcc/c-typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr14649-1.c [new file with mode: 0644]