This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/38064] [c++0x] operator== doesn't work for enum classes
- From: "jason at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 May 2009 23:01:20 -0000
- Subject: [Bug c++/38064] [c++0x] operator== doesn't work for enum classes
- References: <bug-38064-15404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from jason at gcc dot gnu dot org 2009-05-25 23:01 -------
Subject: Bug 38064
Author: jason
Date: Mon May 25 23:01:02 2009
New Revision: 147854
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147854
Log:
PR c++/38064
* typeck.c (cp_build_binary_op): Allow ENUMERAL_TYPE in
arithmetic comparisons.
(cp_common_type): Handle scoped enums.
* call.c (promoted_arithmetic_type_p): Don't use INTEGRAL_TYPE_P.
(add_builtin_candidate, add_builtin_candidates): Likewise.
(convert_like_real): Likewise.
* class.c (check_bitfield_decl): Likewise.
* decl.c (check_static_variable_definition): Likewise.
(compute_array_index_type): Likewise.
* decl2.c (grokbitfield): Likewise.
* init.c (build_new_1): Likewise.
* pt.c (convert_nontype_argument): Likewise.
(current_instantiation): Likewise.
* tree.c (pod_type_p): Likewise.
* typeck.c (build_static_cast_1): Likewise.
(build_reinterpret_cast_1): Likewise.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/enum3.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/cp/class.c
trunk/gcc/cp/decl.c
trunk/gcc/cp/decl2.c
trunk/gcc/cp/init.c
trunk/gcc/cp/pt.c
trunk/gcc/cp/tree.c
trunk/gcc/cp/typeck.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064