diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-02 01:31:18 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-02 01:31:18 +0000 |
commit | ce984e5e401accb43a1c4bfee31a4743f4004118 (patch) | |
tree | 6c2db2fc090bec484b5ef60fbe416d72e1c7b6a4 /gcc/cp/cvt.c | |
parent | ace3c39fedeb99434010407708a44e397c45b535 (diff) | |
download | gcc-ce984e5e401accb43a1c4bfee31a4743f4004118.tar.gz |
* call.c (null_ptr_cst_p): Use maybe_constant_value.
(set_up_extended_ref_temp): Support constant initialization.
(initialize_reference): Adjust.
* class.c (check_bitfield_decl): Use cxx_constant_value.
* cvt.c (ocp_convert): Don't use integral_constant_value when
converting to class type.
* decl.c (finish_case_label): Use maybe_constant_value.
(build_init_list_var_init): Support constant initialization.
(check_initializer): Likewise. Reorganize.
(cp_finish_decl): Likewise.
(expand_static_init): Likewise.
(compute_array_index_type): Use maybe_constant_value.
Add complain parm.
(create_array_type_for_decl, grokdeclarator): Pass it.
(build_enumerator): Use cxx_constant_value.
* decl2.c (grokfield): Use maybe_constant_init.
* except.c (check_noexcept_r): Handle constexpr.
(build_noexcept_spec): Use maybe_constant_value.
* init.c (expand_default_init): Support constant initialization.
(build_vec_init): Likewise.
(constant_value_1): Adjust.
(build_new_1): Adjust.
* parser.c (cp_parser_constant_expression): Allow non-integral
in C++0x mode.
(cp_parser_direct_declarator): Don't fold yet in C++0x mode.
(cp_parser_initializer_clause): Toss folded result if non-constant.
* pt.c (fold_decl_constant_value): Remove.
(convert_nontype_argument): Use maybe_constant_value. Give clearer
error about overflow.
(tsubst): Move array bounds handling into compute_array_index_type.
(value_dependent_expression_p): Handle constant CALL_EXPR.
* semantics.c (finish_static_assert): Use maybe_constant_value.
(ensure_literal_type_for_constexpr_object): Make sure type is complete.
(potential_constant_expression): Use maybe_constant_value.
* tree.c (cast_valid_in_integral_constant_expression_p): Any cast
is potentially valid in C++0x.
* typeck2.c (store_init_value): Handle constant init.
(check_narrowing): Use maybe_constant_value.
(build_functional_cast): Set TREE_CONSTANT on literal T().
* cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): Remove.
(LOOKUP_ALREADY_DIGESTED): New.
(compute_array_index_type): Adjust prototype.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166167 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cvt.c')
-rw-r--r-- | gcc/cp/cvt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index 95d0ab9f43f..d2d6f4acdf9 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -609,7 +609,10 @@ ocp_convert (tree type, tree expr, int convtype, int flags) return error_mark_node; } - e = integral_constant_value (e); + /* 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); if (error_operand_p (e)) return error_mark_node; |