cp/
PR c++/66243
* decl.c (build_enumerator): Don't silently convert scoped enums.
testsuite/
PR c++/66243
* g++.dg/cpp0x/pr66243.C: New.
From-SVN: r223636
-2015-05-22 Jan Hubicka <hubicka@ucw.cz>
+2015-05-24 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/66243
+ * decl.c (build_enumerator): Don't silently convert scoped enums.
+
+2015-05-24 Jan Hubicka <hubicka@ucw.cz>
PR lto/66180
* mangle.c (mangle_decl): Mangle anonymous namespace types as
if (tmp_value)
value = tmp_value;
}
- else if (! INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (value)))
+ else if (! INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P
+ (TREE_TYPE (value)))
value = perform_implicit_conversion_flags
(ENUM_UNDERLYING_TYPE (enumtype), value, tf_warning_or_error,
LOOKUP_IMPLICIT | LOOKUP_NO_NARROWING);
-2015-05-22 Jan Hubicka <hubicka@ucw.cz>
+2015-05-23 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/66243
+ * g++.dg/cpp0x/pr66243.C: New.
+
+2015-05-24 Jan Hubicka <hubicka@ucw.cz>
PR lto/66180
* g++.dg/lto/pr66180_0.C: New testcase.
--- /dev/null
+// { dg-do compile { target c++11 } }
+
+enum class A
+{
+ X
+};
+
+enum class B
+{
+ X = A::X // { dg-error "could not convert" }
+};
+