+2016-06-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/71465
+ Revert:
+ 2016-06-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/70202
+ * parser.c (cp_parser_class_head): When xref_basetypes fails and
+ emits an error do not zero the type.
+
2016-06-08 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (maybe_deduce_size_from_array_init): Use
/* If we're really defining a class, process the base classes.
If they're invalid, fail. */
- if (type && cp_lexer_next_token_is (parser->lexer, CPP_OPEN_BRACE))
- xref_basetypes (type, bases);
+ if (type && cp_lexer_next_token_is (parser->lexer, CPP_OPEN_BRACE)
+ && !xref_basetypes (type, bases))
+ type = NULL_TREE;
done:
/* Leave the scope given by the nested-name-specifier. We will
+2016-06-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/71465
+ * g++.dg/inherit/crash5.C: New.
+ Revert:
+ 2016-06-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/70202
+ * g++.dg/inherit/crash5.C: New.
+ * g++.dg/inherit/virtual1.C: Adjust.
+
2016-06-09 Martin Liska <mliska@suse.cz>
* g++.dg/predict-loop-exit-1.C: Scan for a new dump format.
-// PR c++/70202
+// PR c++/71465
-class A
-{
- virtual void foo () { }
-};
-class B : public A, A { }; // { dg-error "duplicate base type" }
-
-B b1, &b2 = b1;
-A a = b2;
+struct A { virtual void foo () {} };
+struct B : virtual A {};
+struct C : virtual A {};
+struct D : C, B, C {}; // { dg-error "duplicate base type" }
virtual ~A() {}
};
-struct B : A, virtual A {}; // { dg-error "duplicate base" }
+struct B : A, virtual A {}; // { dg-error "duplicate base|forward declaration" }
-struct C : A, B {}; // { dg-error "duplicate base" }
+struct C : A, B {}; // { dg-error "duplicate base|invalid use" }
-C c;
+C c; // { dg-error "aggregate" }