2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/35331
* semantics.c (begin_class_definition): Extend checks on the first
argument.
/testsuite
2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/35331
* g++.dg/cpp0x/vt-35331.C: New.
* g++.dg/cpp0x/pr32125.C: Adjust.
* g++.dg/cpp0x/pr32126.C: Likewise.
* g++.dg/cpp0x/pr31438.C: Likewise.
* g++.dg/cpp0x/variadic81.C: Likewise.
* g++.dg/cpp0x/vt-34055.C: Likewise.
* g++.dg/cpp0x/vt-34606.C: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135216
138bc75d-0d04-0410-961f-
82ee72b054a4
+2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/35331
+ * semantics.c (begin_class_definition): Extend checks on the first
+ argument.
+
2008-05-12 Tomas Bily <tbily@suse.cz>
* typeck2.c (digest_init): Use CONVERT_EXPR_P.
tree
begin_class_definition (tree t, tree attributes)
{
- if (t == error_mark_node)
+ if (error_operand_p (t) || error_operand_p (TYPE_MAIN_DECL (t)))
return error_mark_node;
if (processing_template_parmlist)
+2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/35331
+ * g++.dg/cpp0x/vt-35331.C: New.
+ * g++.dg/cpp0x/pr32125.C: Adjust.
+ * g++.dg/cpp0x/pr32126.C: Likewise.
+ * g++.dg/cpp0x/pr31438.C: Likewise.
+ * g++.dg/cpp0x/variadic81.C: Likewise.
+ * g++.dg/cpp0x/vt-34055.C: Likewise.
+ * g++.dg/cpp0x/vt-34606.C: Likewise.
+
2008-05-12 Ira Rosen <irar@il.ibm.com>
* gfortran.dg/vect/pr36119.f: Rename to ...
template<typename> struct A;
template<typename T, typename... U> struct A<T(U)> // { dg-error "parameter packs|U" }
-{ // { dg-error "parameter packs|U" }
- template<typename X> A(X); // { dg-error "parameter packs|U" }
+{
+ template<typename X> A(X);
};
A<void(int)> a(0); // { dg-error "incomplete type" }
template<typename...> struct A;
template<typename...T> struct A<T*> // { dg-error "not expanded|T" }
-{ // { dg-error "not expanded|T" }
- A(); // { dg-error "not expanded|T" }
- A(T); // { dg-error "not expanded|T" }
+{
+ A();
+ A(T);
};
template<typename...> struct A;
template<typename...T> struct A<T> // { dg-error "not expanded|T|" }
-{ // { dg-error "not expanded|T|" }
+{
static int i;
};
template<typename> struct A;
template<typename... T> struct A<T*> // { dg-error "not expanded|T|not used|T" }
-{ // { dg-error "not expanded|T|not used|T" }
+{
struct B;
};
template<typename...> struct A;
template<typename...T> struct A<T*> // { dg-error "parameter packs|T" }
-{ // { dg-error "parameter packs|T" }
- void foo(); // { dg-error "parameter packs|T|candidate" }
+{
+ void foo();
};
template<typename...T> void A<T*>::foo() {} // { dg-error "invalid declarator" }
template<typename...> struct B;
template<typename...T> struct B<T&> // { dg-error "parameter packs|T" }
-{ // { dg-error "parameter packs|T" }
- void foo(); // { dg-error "parameter packs|T" }
+{
+ void foo();
};
template<typename...T> void B<T&>::foo() {} // { dg-error "invalid declarator" }
template<typename...> struct C;
template<typename...T> struct C<T()> // { dg-error "parameter packs|T" }
-{ // { dg-error "parameter packs|T" }
- void foo(); // { dg-error "parameter packs|T" }
+{
+ void foo();
};
template<typename...T> void C<T()>::foo() {} // { dg-error "invalid declarator" }
template<typename...> struct A;
template<typename T, typename... U> struct A<T, U> // { dg-error "parameter packs|U" }
-{ // { dg-error "parameter packs|U" }
+{
template<typename> struct B;
- template<typename X> struct B<X*> {}; // { dg-error "parameter packs|U" }
+ template<typename X> struct B<X*> {};
};
--- /dev/null
+// { dg-options "-std=c++0x" }
+template<typename...> struct A;
+
+template<typename...T> struct A<T*> // { dg-error "not expanded|T" }
+{
+ friend void foo();
+};