diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-19 22:06:17 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-19 22:06:17 +0000 |
commit | 2055d27ae6174a05c25ea123052ebc84af6013c8 (patch) | |
tree | 7ab8f15cad76cb28be65015b3cbb7153217b4139 /gcc/cp/cvt.c | |
parent | d738ec4aa7db4a723ce65504424d6186707a7ee8 (diff) | |
download | gcc-2055d27ae6174a05c25ea123052ebc84af6013c8.tar.gz |
PR c++/57979
* init.c (decl_really_constant_value): Rename from
integral_constant_value.
(scalar_constant_value): Similar but limited to scalar results.
(decl_constant_value_safe): Remove.
(constant_value_1): Respect return_aggregate_cst_ok_p.
* typeck.c (decay_conversion): Use scalar_constant_value.
* call.c (convert_like_real): Likewise.
* cvt.c (ocp_convert): No need to check CLASS_TYPE_P.
* typeck.c (decay_conversion): Or ARRAY_TYPE.
* constexpr.c (struct constexpr_ctx): Add strict field.
(cxx_eval_constant_expression) [VAR_DECL]: Use it to select between
decl_constant_value and decl_really_constant_value.
(cxx_eval_outermost_constant_expr): Add strict parm.
(maybe_constant_init): Not strict.
(potential_constant_expression_1): Add strict parm.
Shorten most internal calls with RECUR macro.
* cp-tree.h, pt.c, semantics.c: Adjust.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217814 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cvt.c')
-rw-r--r-- | gcc/cp/cvt.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index 7be4f311a35..aba75ff13e2 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -675,9 +675,7 @@ ocp_convert (tree type, tree expr, int convtype, int flags, } /* FIXME remove when moving to c_fully_fold model. */ - /* FIXME do we still need this test? */ - if (!CLASS_TYPE_P (type)) - e = integral_constant_value (e); + e = scalar_constant_value (e); if (error_operand_p (e)) return error_mark_node; |