cp/
PR c++/65954
* typeck.c (finish_class_member_access_expr): Diagnose failed
lookup of enum class member.
testsuite/
* g++.dg/cpp0x/pr65954.C: New.
From-SVN: r223430
+2015-05-19 Nathan sidwell <nathan@acm.org>
+
+ PR c++/65954
+ * typeck.c (finish_class_member_access_expr): Diagnose failed
+ lookup of enum class member.
+
2015-05-19 Jakub Jelinek <jakub@redhat.com>
PR middle-end/66199
return error_mark_node;
}
tree val = lookup_enumerator (scope, name);
+ if (!val)
+ {
+ if (complain & tf_error)
+ error ("%qD is not a member of %qD",
+ name, scope);
+ return error_mark_node;
+ }
+
if (TREE_SIDE_EFFECTS (object))
val = build2 (COMPOUND_EXPR, TREE_TYPE (val), object, val);
return val;
+2015-05-19 Nathan sidwell <nathan@acm.org>
+
+ * g++.dg/cpp0x/pr65954.C: New.
+
2015-05-20 Oleg Endo <olegendo@gcc.gnu.org>
* gcc.target/sh/pr64366.c: Remove -m4 -ml from dg-options.
--- /dev/null
+// { dg-do compile { target c++11 } }
+
+struct Shape {
+ enum class Type
+ { Circle, Square };
+};
+
+
+void Foo (Shape &shape)
+{
+ +shape.Type::NOPE; // { dg-error "is not a member of" }
+}