PR c++/53524
commitc28ddc97adc500ba5c4bbb6994d7cb8327445dcb
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Jul 2012 19:14:23 +0000 (2 19:14 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Jul 2012 19:14:23 +0000 (2 19:14 +0000)
tree8becd43c0137d4c13ec1df45fe08c64cceb0a023
parent78b7a67520737f2e029383dd5a89ba8c1c4a3ef9
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
18 files changed:
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/class.c
gcc/cp/cvt.c
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/pt.c
gcc/cp/search.c
gcc/cp/semantics.c
gcc/cp/tree.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/scoped_enum.C
gcc/testsuite/g++.dg/other/ptrmem10.C
gcc/testsuite/g++.dg/other/ptrmem11.C
gcc/testsuite/g++.dg/template/enum7.C [new file with mode: 0644]