diff options
author | sje <sje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-28 20:59:11 +0000 |
---|---|---|
committer | sje <sje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-28 20:59:11 +0000 |
commit | 6e987697fa7ccb6d4f7c957255d849361a29167e (patch) | |
tree | cdfbb3c4d4b73984fae5d7bc07c3c143794cb2a4 /gcc | |
parent | d44dc666b08e3a6ebeb034ef336f76662a9616a0 (diff) | |
download | gcc-6e987697fa7ccb6d4f7c957255d849361a29167e.tar.gz |
2011-07-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/49813
* semantics.c (potential_constant_expression_1): Handle FMA_EXPR.
Checking this in for Paolo.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176899 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-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 653a0ab4d49..ccaba95e880 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 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 |