aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja
diff options
context:
space:
mode:
authorKriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>2003-08-01 15:06:02 +0000
committerKriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org>2003-08-01 15:06:02 +0000
commitcbd63935d8cb0edec8d27a7c427106b41d85a29f (patch)
treecfa3a63f72156106d2f13838ea20b64ffacdbb1f /gcc/testsuite/g++.old-deja
parentee3071efe506d022e4cad7d81354724c01e0f932 (diff)
downloadgcc-cbd63935d8cb0edec8d27a7c427106b41d85a29f.zip
gcc-cbd63935d8cb0edec8d27a7c427106b41d85a29f.tar.gz
gcc-cbd63935d8cb0edec8d27a7c427106b41d85a29f.tar.bz2
PR c++/8442, c++/8806
PR c++/8442, c++/8806 * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are preferred. (check_elaborated_type_specifier): Add allow_template_p parameter. Check tag mismatch and class template. (xref_tag): Add template_header_p parameter. Add assertion that name is an IDENTIFIER_NODE. Remove implicit typename warning. Simplify lookup process if globalize is true. (cxx_init_decl_processing): Adjust call to xref_tag. (xref_tag_from_type): Likewise. * decl2.c (handle_class_head): Likewise. * parser.c (cp_parser_elaborated_type_specifier, cp_parser_class_head): Likewise. * rtti.c (init_rtti_processing, build_dynamic_cast1, tinfo_base_init, emit_support_tinfos): Likewise. * class.c (is_base_of_enclosing_class): Remove. * pt.c (convert_template_argument): Don't accept RECORD_TYPE as template template argument. * cp-tree.h (xref_tag): Adjust declaration. (is_base_of_enclosing_class): Remove. * NEWS: Document template template argument change. * g++.dg/template/elab1.C: Likewise. * g++.dg/template/type2.C: Likewise. * g++.dg/template/ttp3.C: Adjust expected error message. * g++.old-deja/g++.law/visibility13.C: Likewise. * g++.old-deja/g++.niklas/t135.C: Likewise. * g++.old-deja/g++.pt/ttp41.C: Likewise. * g++.old-deja/g++.pt/ttp43.C: Use qualified name for template template argument. * g++.old-deja/g++.pt/ttp44.C: Likewise. From-SVN: r70048
Diffstat (limited to 'gcc/testsuite/g++.old-deja')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/visibility13.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.niklas/t135.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/ttp41.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/ttp43.C8
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/ttp44.C4
5 files changed, 12 insertions, 12 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.law/visibility13.C b/gcc/testsuite/g++.old-deja/g++.law/visibility13.C
index 4ea561b..025b0b1 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/visibility13.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/visibility13.C
@@ -65,7 +65,7 @@ void Array<Type>::init(const Type *array, int sz)
// --------------- Array_RC.h && Array_RC.cc ----------------
template <class Type>
-class Array_RC : public Array<Type> {// { dg-error "" } previous declaration.*
+class Array_RC : public Array<Type> {
public:
Array_RC(const Type *ar, int sz);
Type& operator[](int ix);
diff --git a/gcc/testsuite/g++.old-deja/g++.niklas/t135.C b/gcc/testsuite/g++.old-deja/g++.niklas/t135.C
index 5e826f1..566b0ca 100644
--- a/gcc/testsuite/g++.old-deja/g++.niklas/t135.C
+++ b/gcc/testsuite/g++.old-deja/g++.niklas/t135.C
@@ -1,7 +1,7 @@
-// { dg-do assemble }
+// { dg-do compile }
// GROUPS niklas pt friend
template <class T> class C1
-{ // { dg-error "" }
+{
public:
void diddle_C2 ();
};
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp41.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp41.C
index 18a3322..b260961 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/ttp41.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp41.C
@@ -1,4 +1,4 @@
-// { dg-do run }
+// { dg-do compile }
template<template<class> class D,class E> class C
{
public:
@@ -13,8 +13,8 @@ template<class T> class D
template<class T> int D<T>::f()
{
- C<D,D> c;
- return c.g();
+ C<D,D> c; // { dg-error "" }
+ return c.g(); // { dg-error "" }
}
int main()
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp43.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp43.C
index d18a4eb..e1bc4ce 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/ttp43.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp43.C
@@ -20,11 +20,11 @@ struct Lit {
template < class T >
struct Id {
- Add < T, Id, Lit > operator+(const T& t) const {
- return Add < T, Id, Lit >(*this, Lit<T>(t));
+ Add < T, ::Id, Lit > operator+(const T& t) const {
+ return Add < T, ::Id, Lit >(*this, Lit<T>(t));
}
- Mul < T, Id, Lit > operator*(const T& t) const {
- return Mul < T, Id, Lit >(*this, Lit<T>(t));
+ Mul < T, ::Id, Lit > operator*(const T& t) const {
+ return Mul < T, ::Id, Lit >(*this, Lit<T>(t));
}
};
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp44.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp44.C
index f977fcb..08eb307 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/ttp44.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp44.C
@@ -9,8 +9,8 @@ public:
template < class T >
struct Id {
template < template < class > class E >
- Add < T, Id, E > operator+(const E<T>& e) const {
- return Add < T, Id, E >(*this, e);
+ Add < T, ::Id, E > operator+(const E<T>& e) const {
+ return Add < T, ::Id, E >(*this, e);
}
};