diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-02 19:14:23 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-02 19:14:23 +0000 |
commit | c28ddc97adc500ba5c4bbb6994d7cb8327445dcb (patch) | |
tree | 8becd43c0137d4c13ec1df45fe08c64cceb0a023 /gcc/cp/cvt.c | |
parent | 78b7a67520737f2e029383dd5a89ba8c1c4a3ef9 (diff) | |
download | gcc-c28ddc97adc500ba5c4bbb6994d7cb8327445dcb.tar.gz |
PR c++/53524
gcc/cp/
* call.c (build_conditional_expr_1): Don't warn about comparison of
two enumerators before their enumeration is complete.
(build_new_op_1): Call decay_conversion before warn_logical_operator.
* decl.c (build_enumerator): Set DECL_CONTEXT of an enumerator to
its enumeration.
* decl2.c (mark_used): Call used_types_insert for enums.
* semantics.c (finish_id_expression): Don't decay CONST_DECL.
(finish_member_declaration): Don't change DECL_CONTEXT of enumerators.
* class.c (check_field_decls): Don't change DECL_CONTEXT of enums.
* typeck.c (convert_for_assignment): Don't decay CONST_DECL.
(build_class_member_access_expr): Look through unscoped enums.
* search.c (context_for_name_lookup): Look through unscoped enums.
* pt.c (tsubst_copy_and_build): Don't decay CONST_DECL.
(tsubst_copy): Use DECL_CONTEXT to find the enumeration.
* tree.c (decl_linkage): Likewise.
* cvt.c (ocp_convert): Check decayed expr for enum range warning.
gcc/c-family/
* c-common.c (get_priority): Call default_conversion.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189174 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cvt.c')
-rw-r--r-- | gcc/cp/cvt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index 998d4eb345e..9550f1580bb 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -741,8 +741,8 @@ ocp_convert (tree type, tree expr, int convtype, int flags, values. Otherwise, the resulting enumeration value is unspecified. */ if ((complain & tf_warning) - && TREE_CODE (expr) == INTEGER_CST - && !int_fits_type_p (expr, ENUM_UNDERLYING_TYPE (type))) + && TREE_CODE (e) == INTEGER_CST + && !int_fits_type_p (e, ENUM_UNDERLYING_TYPE (type))) warning_at (loc, OPT_Wconversion, "the result of the conversion is unspecified because " "%qE is outside the range of type %qT", |