From: Paolo Carlini Date: Thu, 28 Jul 2011 20:59:11 +0000 (+0000) Subject: re PR c++/49813 ([C++0x] sinh vs asinh vs constexpr) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f715f0c186c369103dc28a7fb96c20ccd53cc559;p=gcc.git re PR c++/49813 ([C++0x] sinh vs asinh vs constexpr) 2011-07-28 Paolo Carlini PR c++/49813 * semantics.c (potential_constant_expression_1): Handle FMA_EXPR. Checking this in for Paolo. From-SVN: r176899 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 653a0ab4d49..ccaba95e880 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2011-07-28 Paolo Carlini + + PR c++/49813 + * semantics.c (potential_constant_expression_1): Handle FMA_EXPR. + 2011-07-27 Jeffrey Yasskin * pt.c (build_template_decl): Copy the function_decl's diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index fdd6c33b576..c44c0efd0ae 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -8057,6 +8057,13 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags) return false; return true; + case FMA_EXPR: + for (i = 0; i < 3; ++i) + if (!potential_constant_expression_1 (TREE_OPERAND (t, i), + true, flags)) + return false; + return true; + case COND_EXPR: case VEC_COND_EXPR: /* If the condition is a known constant, we know which of the legs we