diff options
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/semantics.c | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 653a0ab..ccaba95 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2011-07-28 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/49813 + * semantics.c (potential_constant_expression_1): Handle FMA_EXPR. + 2011-07-27 Jeffrey Yasskin <jyasskin@google.com> * pt.c (build_template_decl): Copy the function_decl's diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index fdd6c33..c44c0ef 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 |