aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1998-10-08 16:48:47 +0000
committerRichard Henderson <rth@cygnus.com>1998-10-08 16:48:47 +0000
commit04af8357a3460aadde12fda4b5281b67a1320484 (patch)
tree64192a2408c2b21b27a3505143fc8916e1dbb824 /gcc/testsuite/g++.old-deja
parent13dc3bd31d526d3ec86ceb12be1fffc090966334 (diff)
* Merge from EGCS mainline, tag gc_merge_981008.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/egcs_gc_branch@22927 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.old-deja')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.benjamin/p12475.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.benjamin/warn03.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/array1.C9
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/crash39.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/crash56.C385
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/crash8.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/groff1.C34
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/reference1.C57
-rw-r--r--gcc/testsuite/g++.old-deja/g++.bugs/900402_01.C16
-rw-r--r--gcc/testsuite/g++.old-deja/g++.bugs/900404_04.C25
-rw-r--r--gcc/testsuite/g++.old-deja/g++.bugs/900519_05.C20
-rw-r--r--gcc/testsuite/g++.old-deja/g++.eh/rethrow3.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.eh/spec1.C8
-rw-r--r--gcc/testsuite/g++.old-deja/g++.eh/spec2.C8
-rw-r--r--gcc/testsuite/g++.old-deja/g++.eh/spec3.C8
-rw-r--r--gcc/testsuite/g++.old-deja/g++.eh/spec4.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/ref4.C5
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/rfg15.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/scoping12.C10
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/tempcons.C9
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/template31.C40
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/thunk2.C49
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/thunk3.C57
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/typeid1.C12
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/arm13.C16
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/arm2.C18
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/operators27.C35
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/operators29.C24
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/visibility13.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/dyncast1.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/dyncast2.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/dyncast7.C29
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/eh19.C24
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/eh23.C47
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/eh25.C31
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/eh33.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/eh34.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/eh47.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/eh48.C33
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/eh5.C22
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/eh50.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/eh51.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/eh55.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/ns11.C19
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/ns13.C14
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/ns14.C12
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/ns9.C12
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p1989.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p785.C18
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/using1.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit12.C8
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit13.C7
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit34.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit35.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit7.C16
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/instantiate1.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/memclass7.C7
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/memclass8.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/memtemp60.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/memtemp61.C3
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/memtemp62.C3
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/memtemp71.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/redecl1.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/spec10.C13
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/spec11.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/spec12.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/spec13.C13
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/spec15.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/spec6.C14
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/t05.C14
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/ttp3.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/typedef1.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/typename3.C1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/typename4.C1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/typename5.C1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/typename6.C1
-rw-r--r--gcc/testsuite/g++.old-deja/old-deja.exp67
77 files changed, 148 insertions, 1219 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/p12475.C b/gcc/testsuite/g++.old-deja/g++.benjamin/p12475.C
index ee1e39f0203..6e911a384bc 100644
--- a/gcc/testsuite/g++.old-deja/g++.benjamin/p12475.C
+++ b/gcc/testsuite/g++.old-deja/g++.benjamin/p12475.C
@@ -1,5 +1,5 @@
// Build don't link:
// prms-id: 12475
+// excess errors test - XFAIL alpha*-*-* mips64*-*-*
-enum huh { start =-2147483648, next }; // WARNING -
-
+enum huh { start =-2147483648, next }; // WARNING - , XFAIL sparc64-*-* alpha*-*-*
diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/warn03.C b/gcc/testsuite/g++.old-deja/g++.benjamin/warn03.C
index 2f3b56fb7f3..b3bd3affc9d 100644
--- a/gcc/testsuite/g++.old-deja/g++.benjamin/warn03.C
+++ b/gcc/testsuite/g++.old-deja/g++.benjamin/warn03.C
@@ -1,7 +1,7 @@
// 980420 bkoz
// from g++/15307, tests for -Wredundant-decls for decls
-// Build don't link: Special g++ Options:
-// -Wredundant-decls
+// Build don't link:
+// Special g++ Options: -Wredundant-decls
//shouldn't crash
extern unsigned char *foo5[];
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/array1.C b/gcc/testsuite/g++.old-deja/g++.brendan/array1.C
index 64924639f6f..3dfa65981fa 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/array1.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/array1.C
@@ -1,7 +1,2 @@
-// Build don't link:
-// Special g++ Options: -fconserve-space -fcommon
-// GROUPS passed array-bindings
-// excess errors test - XFAIL sparc64-*-*
-extern "C" void printf (char *, ...);
-char array[(unsigned) 0x90000000];// ERROR - overflow in array dimension.* , XFAIL sparc64-*-* alpha*-*-*
-int main () { printf ("PASS\n"); return 0; }
+
+char array[~(~0ul>>1)|~(0ul>>3)]; // ERROR - overflow in array dimension.*
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash39.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash39.C
index 67f5538756b..a19187295ec 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/crash39.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash39.C
@@ -29,5 +29,5 @@ public:
#include <string>
class foo {public: foo () {}};
-class bar {public: bar (foo& dflt);};
+class bar {public: bar (const foo& dflt);};
class baz: public bar {public: baz (): bar (foo ()) {}};
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash56.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash56.C
index 7b470678a78..75658ec469c 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/crash56.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash56.C
@@ -1,383 +1,4 @@
-// Build don't link:
-// GROUPS passed old-abort
-const bool FALSE = 0;
-const bool TRUE = 1;
-class ListDProto {
-public:
- ListDProto();
- ListDProto(const ListDProto&);
- virtual ~ListDProto();
- void operator=(const ListDProto&);
- unsigned length() const;
- bool empty() const;
- void clear();
- void remove_head();
- void remove_tail();
- class link;
- class Vix {
- public:
- Vix();
- friend int operator==(void *v, const Vix& x)
- { return v == x.item; }// ERROR - list of candidates
- friend int operator==(const Vix& x, void *v)
- { return v == x.item; }// ERROR - candidate for call
- friend int operator!=(void *v, const Vix& x)
- { return v != x.item; }
- friend int operator!=(const Vix& x, void *v)
- { return v != x.item; }
- friend int operator==(const Vix& x1, const Vix& x2)
- { return x1.owner == x2.owner && x1.item == x2.item; }// ERROR - candidate for call
- friend int operator!=(const Vix& x1, const Vix& x2)
- { return x1.owner != x2.owner || x1.item != x2.item; }
- bool first;
- bool last;
- protected:
- friend class ListDProto;
- Vix(const ListDProto *o, link *i);
- const ListDProto *owner;
- private:
- link *item;
- };
- enum Action { NORMAL, REMOVE_CURRENT };
- Vix first() const;
- void first(Vix& x) const;
- void next(Vix& x) const;// ERROR - candidate for call
- void next(Vix& x, Action a = NORMAL);// ERROR - list of candidates
- Vix last() const;
- void last(Vix& x) const;
- void prev(Vix& x) const;
- void prev(Vix& x, Action a = NORMAL);
-protected:
- struct link {
- link *next;
- link *prev;
- link(link *n = 0, link *p = 0);
- virtual ~link();
- private:
- link(const link&);
- void operator=(const link&);
- };
- unsigned count;
- link *list_head;
- link *list_tail;
- virtual link *copy_item(link *old_item) const = 0;
- void prepend(link *item);
- void append(link *item);
- void prepend(const ListDProto& proto);
- void append(const ListDProto& proto);
- void remove(link *item);
- link *ref(const Vix&) const;
-};
-template<class T>
-class ListD: public ListDProto {
-public:
- void prepend(const T& item);
- void append(const T& item);
- const T& head() const;
- T& head();
- void head(T& fill) const;
- void remove_head()
- { ListDProto::remove_head(); }
- void remove_head(T& fill);
- const T& tail() const;
- T& tail();
- void tail(T& fill) const;
- void remove_tail()
- { ListDProto::remove_tail(); }
- void remove_tail(T& fill);
- class Vix: public ListDProto::Vix {
- public:
- Vix(): ListDProto::Vix()
- { }
- protected:
- friend class ListD<T>;
- Vix(const ListDProto::Vix& x): ListDProto::Vix(x)
- { }
- };
- Vix first() const
- { return ListDProto::first(); };
- void first(Vix& x) const
- { ListDProto::first(x); };
- void next(Vix& x, ListDProto::Action a = NORMAL) const
- { ListDProto::next(x, a); }// ERROR - .*// ERROR - .*
- Vix last() const
- { return ListDProto::last(); }
- void last(Vix& x) const
- { return ListDProto::last(x); }
- void prev(Vix& x, ListDProto::Action a = NORMAL) const
- { return ListDProto::prev(x, a); }
-protected:
- struct link_item: public ListDProto::link {
- T item;
- link_item(const T& i): link(0, 0), item(i)
- { }
- private:
- link_item(const link_item&);
- void operator=(const link_item&);
- };
-public:
- T& operator()(const Vix& x)
- { link_item *li = (link_item *) ref(x);
- return li->item; }
- const T& operator()(const Vix& x) const
- { link_item *li = (link_item *) ref(x);
- return li->item; }
-private:
- ListDProto::link *copy_item(ListDProto::link *old_item) const;
-};
-template<class T>
-class SetLD: private ListD<T> {
-public:
- SetLD();
- SetLD(const ListD<T>&);
- void add(const T& item);
- void add(const ListD<T>& other);
- void add(const SetLD<T>& other);
- void remove(const T& item);
- bool contains(const T& item) const;
- ListD<T>::length;
- ListD<T>::empty;
- ListD<T>::clear;
- typedef ListD<T>::Vix Vix;
- ListD<T>::first;
- ListD<T>::next;
- ListD<T>::operator();
-};
-extern "C" {
-extern void __eprintf (const char *, const char *, unsigned, const char *);
-}
-extern "C" {
-extern void __eprintf (const char *, const char *, unsigned, const char *);
-}
-template<class T>
-void
-ListD<T>::prepend(const T& item)
-{
- link *newl = new link_item(item);
- ListDProto::prepend(newl);
-}
-template<class T>
-void
-ListD<T>::append(const T& item)
-{
- link *newl = new link_item(item);
- ListDProto::append(newl);
-}
-template<class T>
-const T&
-ListD<T>::head() const
-{
- ((void) (( 0 != list_head ) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "/home/wbaker/work/include/templates/ListD.body.h" , 50 , "0 != list_head" ), 0) )) ;
- link_item *h = (link_item *) list_head;
- return h->item;
-}
-template<class T>
-T&
-ListD<T>::head()
-{
- ((void) (( 0 != list_head ) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "/home/wbaker/work/include/templates/ListD.body.h" , 59 , "0 != list_head" ), 0) )) ;
- link_item *h = (link_item *) list_head;
- return h->item;
-}
-template<class T>
-void
-ListD<T>::head(T& fill) const
-{
- ((void) (( 0 != list_head ) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "/home/wbaker/work/include/templates/ListD.body.h" , 68 , "0 != list_head" ), 0) )) ;
- link_item *h = (link_item *) list_head;
- fill = h->item;
-}
-template<class T>
-void
-ListD<T>::remove_head(T& fill)
-{
- head(fill);
- remove_head();
-}
-template<class T>
-const T&
-ListD<T>::tail() const
-{
- ((void) (( 0 != list_tail ) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "/home/wbaker/work/include/templates/ListD.body.h" , 85 , "0 != list_tail" ), 0) )) ;
- link_item *h = (link_item *) list_tail;
- return h->item;
-}
-template<class T>
-T&
-ListD<T>::tail()
-{
- ((void) (( 0 != list_tail ) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "/home/wbaker/work/include/templates/ListD.body.h" , 94 , "0 != list_tail" ), 0) )) ;
- link_item *h = (link_item *) list_tail;
- return h->item;
-}
-template<class T>
-void
-ListD<T>::tail(T& fill) const
-{
- ((void) (( 0 != list_tail ) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "/home/wbaker/work/include/templates/ListD.body.h" , 103 , "0 != list_tail" ), 0) )) ;
- link_item *h = (link_item *) list_tail;
- fill = h->item;
-}
-template<class T>
-void
-ListD<T>::remove_tail(T& fill)
-{
- ((void) (( 0 != list_tail ) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "/home/wbaker/work/include/templates/ListD.body.h" , 112 , "0 != list_tail" ), 0) )) ;
- link_item *h = (link_item *) list_tail;
- fill = h->item;
-}
-template<class T>
-ListDProto::link *
-ListD<T>::copy_item(ListDProto::link *old) const
-{
- link_item *old_item = (link_item *) old;
- link_item *new_item = new link_item(old_item->item);
- return new_item;
-}
-template<class T>
-SetLD<T>::SetLD():
-ListD<T>()
-{ }
-template<class T>
-SetLD<T>::SetLD(const ListD<T>& other):
-ListD<T>(other)
-{ }
-template<class T>
-void
-SetLD<T>::add(const T& item)
-{
- if ( ! contains(item) )
- append(item);
-}
-template<class T>
-void
-SetLD<T>::add(const ListD<T>& other)
-{
- ListD<T>::Vix x;
- for (first(x); 0 != x; next(x))
- add(other(x));
-}
-template<class T>
-void
-SetLD<T>::add(const SetLD<T>& other)
-{
- const ListD<T>& lother = other;
- add(lother);
-}
-template<class T>
-void
-SetLD<T>::remove(const T& item)
-{
- Action a = NORMAL;
- Vix x;
- for (first(x); 0 != x && REMOVE_CURRENT != a; next(x, a))
- a = operator()(x) == item ? REMOVE_CURRENT: NORMAL;// ERROR - .*
-}
-template<class T>
-bool
-SetLD<T>::contains(const T& item) const
-{
- Vix x;
- for (first(x); 0 != x; next(x)) {
- if (operator()(x) == item)// ERROR - .*
- return TRUE;
- }
- return FALSE;
-}
-template<class T>
-int
-operator==(const SetLD<T>& a, const SetLD<T>& b)
-{
- if (a.length() != b.length())
- return FALSE;
- SetLD<T>::Vix x;
- for (a.first(x); 0 != x; a.next(x)) {
- if ( ! b.contains(a(x)) )
- return FALSE;
- }
- for (b.first(x); 0 != x; b.next(x)) {
- if ( ! a.contains(b(x)) )
- return FALSE;
- }
- return TRUE;
-}
-template<class T>
-int
-operator!=(const SetLD<T>& a, const SetLD<T>& b)
-{ return ! (a == b); }
-template<class T>
-int
-operator<=(const SetLD<T>& a, const SetLD<T>& b)
-{
- if (a.length() > b.length())
- return FALSE;
- SetLD<T>::Vix x;
- for (x=a.first(); 0 != x; a.next(x)) {
- if ( ! b.contains(a(x)) )
- return FALSE;
- }
- return TRUE;
-}
-template<class T>
-int
-operator<(const SetLD<T>& a, const SetLD<T>& b)
-{
- if (a.length() >= b.length())
- return FALSE;
- return a <= b;
-}
-template<class T>
-int
-operator>(const SetLD<T>& a, const SetLD<T>& b)
-{ return ! (a <= b); }
-template<class T>
-int
-operator>=(const SetLD<T>& a, const SetLD<T>& b)
-{ return ! (a < b); }
-class String { };
-class IcaseString: public String { };
-class SetLD< IcaseString >: public SetLD< String > { public: SetLD (): SetLD< String >() { }; SetLD (const ListD< IcaseString >& other): SetLD< String >() { ListD< IcaseString >::Vix x; for (other.first(x); 0 != x; other.next(x)) add(other(x)); }; SetLD (const SetLD & other): SetLD< String >(other) { }; const IcaseString & operator()(const Vix& x) const { return ( IcaseString &) SetLD< String >::operator()(x); } }; typedef SetLD< String > SetLD_String_IcaseString_old_tmp99; typedef SetLD< IcaseString > SetLD_String_IcaseString_new_tmp99;
-inline int operator== (const SetLD_String_IcaseString_new_tmp99& a, const SetLD_String_IcaseString_new_tmp99& b)
-{// ERROR - candidate for call
-const SetLD_String_IcaseString_old_tmp99& oa = a;
-const SetLD_String_IcaseString_old_tmp99& ob = b;
-return operator== (oa, ob); }
-inline int operator!= (const SetLD_String_IcaseString_new_tmp99& a, const SetLD_String_IcaseString_new_tmp99& b)
-{
-const SetLD_String_IcaseString_old_tmp99& oa = a;
-const SetLD_String_IcaseString_old_tmp99& ob = b;
-return operator!= (oa, ob); }
-inline int operator< (const SetLD_String_IcaseString_new_tmp99& a, const SetLD_String_IcaseString_new_tmp99& b)
-{
-const SetLD_String_IcaseString_old_tmp99& oa = a;
-const SetLD_String_IcaseString_old_tmp99& ob = b;
-return operator< (oa, ob); }
-inline int operator<= (const SetLD_String_IcaseString_new_tmp99& a, const SetLD_String_IcaseString_new_tmp99& b)
-{
-const SetLD_String_IcaseString_old_tmp99& oa = a;
-const SetLD_String_IcaseString_old_tmp99& ob = b;
-return operator<= (oa, ob); }
-inline int operator> (const SetLD_String_IcaseString_new_tmp99& a, const SetLD_String_IcaseString_new_tmp99& b)
-{
-const SetLD_String_IcaseString_old_tmp99& oa = a;
-const SetLD_String_IcaseString_old_tmp99& ob = b;
-return operator> (oa, ob); }
-inline int operator>= (const SetLD_String_IcaseString_new_tmp99& a, const SetLD_String_IcaseString_new_tmp99& b)
-{
-const SetLD_String_IcaseString_old_tmp99& oa = a;
-const SetLD_String_IcaseString_old_tmp99& ob = b;
-return operator>= (oa, ob); } ;
-typedef SetLD<IcaseString> SLDiS;
-static void
-nop(int i)
-{
- SetLD<IcaseString> x, y;
- nop(x == y);
- nop(x != y);
-nop(x < y);
-nop(x <= y);
-nop(x > y);
-nop(x >= y);
-}
+// Special g++ Options:
-template class SetLD<String>;
+ void next(Vix& x) const;
+ void next(Vix& x, Action a = NORMAL);
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash8.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash8.C
index 2b5dece65c1..8990c465677 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/crash8.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash8.C
@@ -6,7 +6,7 @@ class Elvis
} ;
template<int a>
-class Elvis<0>// ERROR - .*
-{ // ERROR -
+class Elvis<0>
+{ // ERROR - incorrect number of parameters
int geta() { return a ; }
} ;
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/groff1.C b/gcc/testsuite/g++.old-deja/g++.brendan/groff1.C
index 79c5b51371d..07604c9de09 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/groff1.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/groff1.C
@@ -1,33 +1 @@
-// GROUPS passed groff
-/* This should compile properly with the new overloading scheme. */
-
-extern "C" void printf (char *, ...);
-extern "C" void exit (int);
-
-int win = 0;
-
-class symbol
-{
-public:
- symbol(const char *p, int how = 0) {}
- symbol() {}
-};
-
-class dictionary
-{
-public:
- void *lookup(symbol s, void *v=0) { win = 1; }
- void *lookup(const char *) {}
-};
-
-main()
-{
- char buf[2048];
- dictionary exceptions;
- unsigned char *tem = new unsigned char[19 + 1];
-
- exceptions.lookup (symbol (buf), tem);
-
- printf (win ? "PASS\n" : "FAIL\n");
- exit (! win);
-}
+extern "C" void printf (const char *, ...);
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/reference1.C b/gcc/testsuite/g++.old-deja/g++.brendan/reference1.C
index 2a0c2939e4f..9d877546ac8 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/reference1.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/reference1.C
@@ -1,53 +1,4 @@
-// Special g++ Options: -w
-// GROUPS passed references
-// Check that if a reference is initialized to refer to a value
-// which is returned from a function call, the actual call to
-// the function is only invoked for the original initialization
-// of the reference, and not for each subsequent use of the
-// reference.
-//
-// This test fails with G++ 1.35.0- (pre-release).
-// Reported 4/4/89 by Kim Smith
-
-extern "C" void printf (char *, ...);
-
-struct base {
- int data_member;
-
- base () {}
- void function_member ();
-};
-
-base base_object;
-
-base base_returning_function ();
-
-int call_count = 0;
-
-int main ()
-{
- base& base_ref = base_returning_function ();
-
- base_ref.function_member ();
- base_ref.function_member ();
- base_ref.data_member = 99;
-
- if (call_count == 1)
- printf ("PASS\n");
- else
- printf ("FAIL\n");
-
- return 0;
-}
-
-base base_returning_function ()
-{
- base local_base_object;
-
- call_count++;
- return local_base_object;
-}
-
-void base::function_member ()
-{
-}
+ mutable int data_member;
+ void function_member () const;
+ const base& base_ref = base_returning_function ();
+void base::function_member () const
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900402_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900402_01.C
index 4e636b5ece9..d2807be0514 100644
--- a/gcc/testsuite/g++.old-deja/g++.bugs/900402_01.C
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900402_01.C
@@ -1,15 +1 @@
-// g++ 1.37.1 bug 900402_01
-
-// The following erroneous code causes g++ to abort.
-
-// Cfront 2.0 passes this test.
-
-// keywords: abort, bit-fields, function types
-
-typedef void (func_type) ();
-
-struct s {
- func_type f:32; // ERROR - XFAIL *-*-*
-};
-
-int main () { return 0; }
+ func_type f:32; // ERROR - bitified with function type
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900404_04.C b/gcc/testsuite/g++.old-deja/g++.bugs/900404_04.C
index b6d4830b14d..8cc9d20e6ed 100644
--- a/gcc/testsuite/g++.old-deja/g++.bugs/900404_04.C
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900404_04.C
@@ -1,20 +1,5 @@
-// g++ 1.37.1 bug 900404_04
-
-// The ANSI C does not allow vacuous statements (i.e. just semicolons)
-// at the file-scope level.
-
-// The current C++ Reference Manual does not indicate whether these should
-// be considered legal or not.
-
-// I am forced to conclude that C++ will follow ANSI C in this regard,
-// and that these are therefore not legal.
-
-// g++ fails to flag errors for such usage.
-
-// keywords: semicolon, vacuous, file scope, declaration
-
-int i;
-
-; // ERROR - , XFAIL *-*-*
-
-int main () { return 0; }
+// [dcl.dcl] explains that simple-declarations may omit the
+// init-declarator-list only if the decl-specifier-seq declares a
+// class, i.e. if it contains a class-specifier, an
+// elaborated-type-specifier with class key, or an enum-specifier. The
+// declaration below contains neither.
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900519_05.C b/gcc/testsuite/g++.old-deja/g++.bugs/900519_05.C
index 05d2ea03d3d..c7041d9c89a 100644
--- a/gcc/testsuite/g++.old-deja/g++.bugs/900519_05.C
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900519_05.C
@@ -1,18 +1,2 @@
-// g++ 1.37.1 bug 900519_05
-
-// g++ fails to allow the use of function-reference types.
-
-// cfront 2.0 passes this test.
-
-// keywords: function types, reference types
-
-typedef void (func_type) (int, int);
-typedef func_type& func_ref_type; // gets bogus error, XFAIL *-*-*
-
-void function (int arg1, int arg2)
-{
-}
-
-func_type& global_func_ref1 = function; // gets bogus error, XFAIL *-*-*
-
-int main () { return 0; }
+typedef func_type& func_ref_type;
+func_type& global_func_ref1 = function;
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/rethrow3.C b/gcc/testsuite/g++.old-deja/g++.eh/rethrow3.C
index 355bedc64c9..bea447bf27f 100644
--- a/gcc/testsuite/g++.old-deja/g++.eh/rethrow3.C
+++ b/gcc/testsuite/g++.old-deja/g++.eh/rethrow3.C
@@ -33,6 +33,6 @@ eh_test (int level)
main ()
{
- set_terminate (&eh_terminate);
+ std::set_terminate (&eh_terminate);
eh_test (0);
}
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/spec1.C b/gcc/testsuite/g++.old-deja/g++.eh/spec1.C
index 73ee960f120..8f450706b04 100644
--- a/gcc/testsuite/g++.old-deja/g++.eh/spec1.C
+++ b/gcc/testsuite/g++.old-deja/g++.eh/spec1.C
@@ -8,15 +8,15 @@ void my_term () { exit (1); }
void my_unexp () { throw 42; }
void
-f () throw (char, int, bad_exception)
+f () throw (char, int, std::bad_exception)
{
throw 'a';
}
main ()
{
- set_terminate (my_term);
- set_unexpected (my_unexp);
+ std::set_terminate (my_term);
+ std::set_unexpected (my_unexp);
try
{
@@ -30,7 +30,7 @@ main ()
{
return 3;
}
- catch (bad_exception)
+ catch (std::bad_exception)
{
return 4;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/spec2.C b/gcc/testsuite/g++.old-deja/g++.eh/spec2.C
index 44013775761..41774bf7de4 100644
--- a/gcc/testsuite/g++.old-deja/g++.eh/spec2.C
+++ b/gcc/testsuite/g++.old-deja/g++.eh/spec2.C
@@ -8,15 +8,15 @@ void my_term () { exit (1); }
void my_unexp () { throw 42; }
void
-f () throw (int, bad_exception)
+f () throw (int, std::bad_exception)
{
throw 'a';
}
main ()
{
- set_terminate (my_term);
- set_unexpected (my_unexp);
+ std::set_terminate (my_term);
+ std::set_unexpected (my_unexp);
try
{
@@ -30,7 +30,7 @@ main ()
{
return 0;
}
- catch (bad_exception)
+ catch (std::bad_exception)
{
return 4;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/spec3.C b/gcc/testsuite/g++.old-deja/g++.eh/spec3.C
index 148be763214..602cd6f5b61 100644
--- a/gcc/testsuite/g++.old-deja/g++.eh/spec3.C
+++ b/gcc/testsuite/g++.old-deja/g++.eh/spec3.C
@@ -8,15 +8,15 @@ void my_term () { exit (1); }
void my_unexp () { throw 42; }
void
-f () throw (bad_exception)
+f () throw (std::bad_exception)
{
throw 'a';
}
main ()
{
- set_terminate (my_term);
- set_unexpected (my_unexp);
+ std::set_terminate (my_term);
+ std::set_unexpected (my_unexp);
try
{
@@ -30,7 +30,7 @@ main ()
{
return 3;
}
- catch (bad_exception)
+ catch (std::bad_exception)
{
return 0;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/spec4.C b/gcc/testsuite/g++.old-deja/g++.eh/spec4.C
index d8b8ce7ed32..adcf6751b1a 100644
--- a/gcc/testsuite/g++.old-deja/g++.eh/spec4.C
+++ b/gcc/testsuite/g++.old-deja/g++.eh/spec4.C
@@ -15,8 +15,8 @@ f () throw (short)
main ()
{
- set_terminate (my_term);
- set_unexpected (my_unexp);
+ std::set_terminate (my_term);
+ std::set_unexpected (my_unexp);
try
{
@@ -30,7 +30,7 @@ main ()
{
return 3;
}
- catch (bad_exception)
+ catch (std::bad_exception)
{
return 4;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/ref4.C b/gcc/testsuite/g++.old-deja/g++.jason/ref4.C
index 422c58cab70..1b442f94e51 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/ref4.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/ref4.C
@@ -1,4 +1 @@
-// Build don't link:
-
-void f ();
-void (&fr)() = f; // gets bogus error - references to functions XFAIL *-*-*
+void (&fr)() = f;
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg15.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg15.C
deleted file mode 100644
index 1f0ff3b64e7..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.jason/rfg15.C
+++ /dev/null
@@ -1,6 +0,0 @@
-const void *cvp;
-
-const void func1 ()
-{
- return *cvp; /* ERROR - returning a value from a void function */
-}
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/scoping12.C b/gcc/testsuite/g++.old-deja/g++.jason/scoping12.C
index ef2f178a186..c02abd44f3b 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/scoping12.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/scoping12.C
@@ -1,9 +1 @@
-void f ()
-{
- struct A {
- friend void g ();
- };
-}
-void h () {
- g (); // ERROR - no g in scope
-}
+// Build don't link:
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/tempcons.C b/gcc/testsuite/g++.old-deja/g++.jason/tempcons.C
index bbc6afeb77e..8a1aa548e77 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/tempcons.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/tempcons.C
@@ -1,8 +1 @@
-// Bug: member initializers are allowed where they shouldn't be.
-// Build don't link:
-
-template <class T>
-class A {
- int i;
- Blarg () : i(0) { } // ERROR -
-};
+struct A {
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template31.C b/gcc/testsuite/g++.old-deja/g++.jason/template31.C
index 8870bf4ec4e..2ef14761bd4 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/template31.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/template31.C
@@ -1,38 +1,4 @@
-// PRMS Id: 8569
-#include <iostream.h>
-#include <vector>
-
-class Component {
- int george;
- char mabel[128];
-};
-class CopyMe {
-public:
- CopyMe(){;}
-private:
- vector<Component> strvec;
-};
-
-class IncludeIt {
-public:
- IncludeIt() {}
- ~IncludeIt() {}
- IncludeIt(const IncludeIt& i) {
- myStrvec = i.myStrvec;
- }
- IncludeIt& operator=(const IncludeIt& i) {
- myStrvec = i.myStrvec;
- }
-private:
- CopyMe myStrvec;
-};
-
-main(int argc, char**argv) {
- IncludeIt foo;
- IncludeIt* bar;
- exit(0);
-}
-
-template class __malloc_alloc_template<0>;
-template class __default_alloc_template<false, 0>;
+using std::vector;
+template class std::__malloc_alloc_template<0>;
+template class std::__default_alloc_template<false, 0>;
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/thunk2.C b/gcc/testsuite/g++.old-deja/g++.jason/thunk2.C
index d4ba59bbf00..6d04058913d 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/thunk2.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/thunk2.C
@@ -1,48 +1 @@
-// Test that non-variadic function calls using thunks and PIC work right.
-// Skip if not native
-// Special g++ Options: -fvtable-thunks -fPIC
-
-struct A {
- void* p;
- A (void* q): p (q) { }
- A (const A& a): p (a.p) { }
-};
-
-class CBase {
-public:
- void BaseFunc();
-};
-
-class MMixin {
-public:
- virtual A MixinFunc(int arg, A arg2) = 0;
-};
-
-class CExample : public CBase, public MMixin {
-public:
- A MixinFunc(int arg, A arg2);
-};
-
-void CBase::BaseFunc()
-{
-}
-
-A CExample::MixinFunc(int arg, A arg2)
-{
- if (arg != 1 || arg2.p != 0)
- return 0;
- return this;
-}
-
-void* test(MMixin& anExample)
-{
- return anExample.MixinFunc(1,A(0)).p;
-}
-
-main ()
-{
- CExample c;
-
- if (test(c) != &c)
- return 1;
-}
+// excess errors test - XFAIL m68k-motorola-sysv m88k-motorola-sysv3
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C b/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C
index 50f008655ea..083eb045e54 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C
@@ -1,56 +1 @@
-// Test that function calls using thunks work right.
-// Special g++ Options: -fvtable-thunks
-// excess errors test - XFAIL mips*-*-* alpha*-*-* rs6000-*-* powerpc-*-eabi m68k-*-coff
-
-#include <stdarg.h>
-
-struct A {
- void* p;
- A (void* q): p (q) { }
- A (const A& a): p (a.p) { }
-};
-
-class CBase {
-public:
- void BaseFunc();
-};
-
-class MMixin {
-public:
- virtual A MixinFunc(int arg, ...) = 0;
-};
-
-class CExample : public CBase, public MMixin {
-public:
- A MixinFunc(int arg, ...);
-};
-
-void CBase::BaseFunc()
-{
-}
-
-A CExample::MixinFunc(int arg, ...)
-{
- va_list ap;
- va_start (ap, arg);
-
- if (arg != 1 || va_arg (ap, int) != 2 || va_arg (ap, int) != 3
- || va_arg (ap, int) != 4 || va_arg (ap, int) != 5
- || va_arg (ap, int) != 6 || va_arg (ap, int) != 7
- || va_arg (ap, int) != 8 || va_arg (ap, int) != 9)
- return 0;
- return this;
-}
-
-void* test(MMixin& anExample)
-{
- return anExample.MixinFunc(1,2,3,4,5,6,7,8,9).p;
-}
-
-main ()
-{
- CExample c;
-
- if (test(c) != &c)
- return 1;
-}
+// excess errors test - XFAIL mips*-*-* alpha*-*-* rs6000-*-* powerpc-*-eabi m68k-*-coff m68k-motorola-sysv m88k-motorola-sysv3
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/typeid1.C b/gcc/testsuite/g++.old-deja/g++.jason/typeid1.C
index 90eeb4558fe..03601d670e1 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/typeid1.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/typeid1.C
@@ -1,11 +1 @@
-#include <typeinfo>
-#include <iostream.h>
-
-struct foo { double f(int); };
-
-main() {
- double f (int);
- const type_info &r = typeid (f);
- cout << typeid(f).name() << endl;
- cout << typeid(foo::f).name() << endl;
-}
+ const std::type_info &r = typeid (f);
diff --git a/gcc/testsuite/g++.old-deja/g++.law/arm13.C b/gcc/testsuite/g++.old-deja/g++.law/arm13.C
index 565fbec3da8..e69de29bb2d 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/arm13.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/arm13.C
@@ -1,16 +0,0 @@
-// GROUPS passed ARM-compliance
-#include <stdio.h>
-#include <stdlib.h>
-
-inline void *operator new(size_t, void *place) { return place; }
-void* malloc(size_t);
-void free(void*);
-
-main()
-{
- int* p = (int*) malloc(sizeof(int));
- (void) new (p) int(1);
- p->int::~int();
- free(p);
- printf ("PASS\n");
-}
diff --git a/gcc/testsuite/g++.old-deja/g++.law/arm2.C b/gcc/testsuite/g++.old-deja/g++.law/arm2.C
index de8fe425bda..0ed556c7981 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/arm2.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/arm2.C
@@ -1,17 +1 @@
-// Build don't link:
-// GROUPS passed ARM-compliance
-// excess errors test - XFAIL *-*-*
-// arm file
-// Message-Id: <199301260140.AA13734@world.std.com>
-// From: gparker@world.std.com (Glenn P Parker)
-// Subject: gcc bug
-// Date: Mon, 25 Jan 1993 20:40:44 -0500
-
-int f() { return 1; }
-
-int main()
-{
- int (&fr)() = f; // g++ cannot compile it
-
- return 0;
-}
+ int (&fr)() = f;
diff --git a/gcc/testsuite/g++.old-deja/g++.law/operators27.C b/gcc/testsuite/g++.old-deja/g++.law/operators27.C
index f8ca9d17317..a23dfd75988 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/operators27.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/operators27.C
@@ -1,33 +1,2 @@
-// GROUPS passed operators
-// opr-new file
-// From: David Binderman 3841 <dcb@us-es.sel.de>
-// Date: Mon, 21 Jun 93 11:42:11 +0200
-// Subject: G++ 2.4.3 and operator new
-// Message-ID: <9306210942.AA10276@slsvitt.us-es.sel.de>
-
-int FLAG=0;
-
-#include <new>
-
-extern "C" int printf( const char *, ...);
-
-void * operator new(size_t, const nothrow_t&) throw() { FLAG=1; return 0; }
-
-class K {
-private:
- int i;
-public:
- K( int j) {
- i = j;
- }
-};
-
-int main(void)
-{
- K * pK = new (nothrow) K( 10);
- if ( FLAG != 1 )
- printf ("FAIL\n");
- else
- printf ("PASS\n");
- return 0;
-}
+void * operator new(size_t, const std::nothrow_t&) throw() { FLAG=1; return 0; }
+ K * pK = new (std::nothrow) K( 10);
diff --git a/gcc/testsuite/g++.old-deja/g++.law/operators29.C b/gcc/testsuite/g++.old-deja/g++.law/operators29.C
index ec0d47c3dc4..e69de29bb2d 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/operators29.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/operators29.C
@@ -1,24 +0,0 @@
-// Build don't link:
-// GROUPS passed operators
-// excess errors test - XFAIL *-*-*
-// (Message bugs/opr-del:4)
-// From: jamshid@ses.com (Jamshid Afshar)
-// Date: Fri, 25 Feb 94 18:44:01 CST
-// Subject: Re: delete on "smart pointers"
-// Message-ID: <9402262328.AA16321@pancake>
-//
-// Who was apparently replying to kuhlins@hawk.wifo.uni-mannheim.de
-
-
-template<class T> class Ptr {
-public:
- Ptr(T*);
- operator T*();
-};
-
-int main() {
- Ptr<int> ip = new int(2);
- delete ip;
- operator delete(ip);
- return 0;
-}
diff --git a/gcc/testsuite/g++.old-deja/g++.law/visibility13.C b/gcc/testsuite/g++.old-deja/g++.law/visibility13.C
index 6e53fc739c5..8bd6a851b71 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/visibility13.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/visibility13.C
@@ -14,7 +14,7 @@
const int ArraySize = 12;
template <class Type>
-class Array {
+class Array { // ERROR - .struct Array_RC redecl.*
friend class Array_RC;
public:
Array(const Type *ar, int sz) { init(ar,sz); }
@@ -97,7 +97,7 @@ try_array( Array_RC<Type> &rc )
main()
{
static int ia[10] = { 12, 7, 14, 9, 128, 17, 6, 3, 27, 5 };
- Array_RC<int> iA(ia, 10);// ERROR - .struct Array_RC redecl.*
+ Array_RC<int> iA(ia, 10);// ERROR - instantiated from here
cout << "template Array_RC class" << endl;
try_array(iA);
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/dyncast1.C b/gcc/testsuite/g++.old-deja/g++.mike/dyncast1.C
index 0b6fd383d99..fbcc489eaaf 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/dyncast1.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/dyncast1.C
@@ -15,7 +15,7 @@ main() {
B b;
try {
(void)dynamic_cast<D&>(b);
- } catch (bad_cast) {
+ } catch (std::bad_cast) {
return 0;
}
return 1;
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/dyncast2.C b/gcc/testsuite/g++.old-deja/g++.mike/dyncast2.C
index dbad6414ae4..ba7a39edbaa 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/dyncast2.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/dyncast2.C
@@ -18,7 +18,7 @@ main() {
try {
void *vp = &dynamic_cast<D&>(*b);
return 1;
- } catch (bad_cast) {
+ } catch (std::bad_cast) {
return 0;
}
return 1;
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/dyncast7.C b/gcc/testsuite/g++.old-deja/g++.mike/dyncast7.C
index 1373d0f5f6e..eee68d2e327 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/dyncast7.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/dyncast7.C
@@ -1,28 +1 @@
-// Special g++ Options: -fexceptions
-
-#include <typeinfo>
-#include <stdexcept>
-
-class A {
-public:
- virtual void j () {}
-};
-
-class B : public A { };
-
-void x (A& a) {
- // These should all work.
- const B& b2 = dynamic_cast<B&>(a);
- const B& b3 = dynamic_cast<const B&>((const A&)a);
- const B& b4 = dynamic_cast<const B&>(a);
-}
-
-int main() {
- try {
- B b;
- x (b);
- } catch (exception& e) {
- // If we get a bad_cast, it is wrong.
- return 1;
- }
-}
+ } catch (std::exception& e) {
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/eh19.C b/gcc/testsuite/g++.old-deja/g++.mike/eh19.C
index 3d9aee14ece..38b4bf16d8b 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/eh19.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/eh19.C
@@ -1,23 +1 @@
-// Special g++ Options: -fexceptions
-// Build don't link:
-
-class test1 {
-public:
- class fehler{public:fehler(){};};
- func(int a) {
- if( a == 0 )
- throw fehler();
- }
-};
-
-main() {
- test1 var;
-
- try {
- var.func(1);
- var.func(0);
- } catch(test1::fehler()) // ERROR - cannot have function type
- {
- ;
- }
-}
+ } catch(test1::fehler()) // function type promoted to pointer
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/eh23.C b/gcc/testsuite/g++.old-deja/g++.mike/eh23.C
index 17a9669388f..88d517a43d6 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/eh23.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/eh23.C
@@ -1,46 +1 @@
-// Special g++ Options: -fexceptions
-// excess errors test - XFAIL a29k-*-* sparc64-*-elf sh-*-* arm-*-pe**-*
-
-#include <exception>
-
-struct double_fault { };
-int fault_now;
-
-class E {
-public:
- E() { }
- E(const E&) {
- if (fault_now)
- throw double_fault();
- }
-};
-
-void foo() {
- try {
- throw E();
- } catch (...) {
- fault_now = 1;
- throw;
- }
-}
-
-void bar() {
- try {
- foo();
- } catch (E e) { // double fault here
- }
-}
-
-void my_terminate() {
- exit (0); // double faults should call terminate
-}
-
-main() {
- set_terminate (my_terminate);
- try {
- bar();
- } catch (...) {
- return 1;
- }
- return 1;
-}
+ std::set_terminate (my_terminate);
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/eh25.C b/gcc/testsuite/g++.old-deja/g++.mike/eh25.C
index 66045b1cf56..b74605b74bf 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/eh25.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/eh25.C
@@ -1,30 +1 @@
-// Special g++ Options: -fexceptions
-// excess errors test - XFAIL a29k-*-* sparc64-*-elf sh-*-* arm-*-pe**-*
-
-#include <exception>
-
-void my_terminate() {
- exit (0); // Double faults should call terminate
-}
-
-struct A {
- A() { }
- ~A() {
- set_terminate (my_terminate);
- throw 1; // This throws from EH dtor, should call my_terminate
- }
-};
-
-main() {
- try {
- try {
- throw 1;
- } catch (int i) {
- A a; // A hit on this EH dtor went to the wrong place
- throw 1;
- }
- } catch (...) {
- return 1;
- }
- return 1;
-}
+ std::set_terminate (my_terminate);
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/eh33.C b/gcc/testsuite/g++.old-deja/g++.mike/eh33.C
index ce57067c6ef..49214f12c88 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/eh33.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/eh33.C
@@ -10,7 +10,7 @@ void my_unexpected() {
foo() throw (int) { throw "Hi"; }
main() {
- set_unexpected (my_unexpected);
+ std::set_unexpected (my_unexpected);
try {
foo();
} catch (int i) {
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/eh34.C b/gcc/testsuite/g++.old-deja/g++.mike/eh34.C
index 986db272429..0f278010023 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/eh34.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/eh34.C
@@ -10,7 +10,7 @@ void my_unexpected() {
foo() throw () { throw "Hi"; }
main() {
- set_unexpected (my_unexpected);
+ std::set_unexpected (my_unexpected);
foo();
return 1;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/eh47.C b/gcc/testsuite/g++.old-deja/g++.mike/eh47.C
index 708de10d9a5..043a6174a6f 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/eh47.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/eh47.C
@@ -14,7 +14,7 @@ main() {
} catch (...) {
}
try {
- set_terminate (myterm);
+ std::set_terminate (myterm);
throw;
} catch (...) {
return 1;
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/eh48.C b/gcc/testsuite/g++.old-deja/g++.mike/eh48.C
index 5cefacd5f1e..db8dc1bbf37 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/eh48.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/eh48.C
@@ -1,32 +1 @@
-// Special g++ Options: -fexceptions
-// excess errors test - XFAIL a29k-*-* sparc64-*-elf sh-*-* arm-*-pe**-*
-
-#include <exception>
-
-class A {
-public:
- ~A() {
- if (uncaught_exception ())
- exit (0);
- }
-};
-
-int main() {
- if (uncaught_exception ())
- return 1;
- try {
- throw "";
- } catch (...) {
- if (uncaught_exception ())
- return 1;
- }
- if (uncaught_exception ())
- return 1;
- try {
- A a;
- throw "";
- } catch (...) {
- return 1;
- }
- return 1;
-}
+using std::uncaught_exception;
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/eh5.C b/gcc/testsuite/g++.old-deja/g++.mike/eh5.C
index 6bc1dc045fd..6454dd6ce5e 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/eh5.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/eh5.C
@@ -1,21 +1 @@
-// Special g++ Options: -fexceptions
-// excess errors test - XFAIL a29k-*-* sparc64-*-elf sh-*-* arm-*-pe**-*
-
-class foo {
-public:
- class error {};
-
- void cause_error(void) { throw "Hello World!"; }
-};
-
-int main(void)
-{
- foo f;
- try {
- f.cause_error();
- }
- catch (char cp[]) {
- return 0;
- }
- return 1;
-}
+ catch (const char cp[]) {
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/eh50.C b/gcc/testsuite/g++.old-deja/g++.mike/eh50.C
index 1ae2d9cc937..0747e1032ef 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/eh50.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/eh50.C
@@ -10,7 +10,7 @@ void my_unexpected() {
template <class T> int foo(T) throw (int) { throw "Hi"; }
main() {
- set_unexpected (my_unexpected);
+ std::set_unexpected (my_unexpected);
try {
foo(1);
} catch (int i) {
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/eh51.C b/gcc/testsuite/g++.old-deja/g++.mike/eh51.C
index 56943d4e667..ac7f620df42 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/eh51.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/eh51.C
@@ -10,7 +10,7 @@ void my_unexpected() {
template <class T> int foo(T) throw (T) { throw "Hi"; }
main() {
- set_unexpected (my_unexpected);
+ std::set_unexpected (my_unexpected);
try {
foo(1);
} catch (int i) {
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/eh55.C b/gcc/testsuite/g++.old-deja/g++.mike/eh55.C
index 7e83aaf0c8b..e64bcf82374 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/eh55.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/eh55.C
@@ -12,7 +12,7 @@ void throw_an_unexpected_exception() throw() {
}
int main() {
- set_terminate(my_terminate_handler);
+ std::set_terminate(my_terminate_handler);
throw_an_unexpected_exception();
return 1;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/ns11.C b/gcc/testsuite/g++.old-deja/g++.mike/ns11.C
index f0243ca41c5..e69de29bb2d 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/ns11.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/ns11.C
@@ -1,19 +0,0 @@
-// excess errors test - XFAIL *-*-*
-class Foo {
-};
-
-namespace A {
- namespace Foo {
- bar() {
- return 0;
- }
- }
-
- mymain() {
- return Foo::bar();
- }
-}
-
-main() {
- return A::mymain();
-}
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/ns13.C b/gcc/testsuite/g++.old-deja/g++.mike/ns13.C
index d0eb3cd5244..e69de29bb2d 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/ns13.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/ns13.C
@@ -1,14 +0,0 @@
-// Build don't link:
-// excess errors test - XFAIL *-*-*
-
-namespace N {
- struct C {
- C();
- };
-}
-
-namespace M {
- struct C {
- C();
- };
-}
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/ns14.C b/gcc/testsuite/g++.old-deja/g++.mike/ns14.C
index 62ac4566359..e69de29bb2d 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/ns14.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/ns14.C
@@ -1,12 +0,0 @@
-// Build don't link:
-// excess errors test - XFAIL *-*-*
-
-namespace Jazz {
- int horn( int h ) { return 1; }
-}
-
-using Jazz::horn;
-
-namespace Jazz {
- int horn ( char c ) { return 0; }
-}
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/ns9.C b/gcc/testsuite/g++.old-deja/g++.mike/ns9.C
index b88ae278e39..e69de29bb2d 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/ns9.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/ns9.C
@@ -1,12 +0,0 @@
-// excess errors test - XFAIL *-*-*
-namespace Foo {
- bar() {
- return 0;
- }
-}
-
-using Foo::bar;
-
-main() {
- return bar();
-}
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p1989.C b/gcc/testsuite/g++.old-deja/g++.mike/p1989.C
index c64aa75bd11..7e1886922eb 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/p1989.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p1989.C
@@ -336,7 +336,7 @@ struct vertex {
vertex(): item(), fanout() // gets bogus error
{ };
- vertex(const T& i): item(), fanout() // gets bogus error - XFAIL *-*-*
+ vertex(const T& i): item(), fanout() // gets bogus error
{ };
};
@@ -439,7 +439,7 @@ Graph<T>::lookup_new(const T& from)
{
vertex<T> *v = lookup(from);
if (0 == v) {
- vertices.append(from); // gets bogus error
+ vertices.append(from);
return &vertices(vertices.last());
}
return v;
@@ -458,7 +458,7 @@ void
Graph<T>::nextV1(Pix vx, Pix& x) const
{
vertex<T> *v = (vertex<T> *) vx;
- return v->fanout.next(x); // ERROR - return from void method
+ return v->fanout.next(x);
}
template<class T>
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p785.C b/gcc/testsuite/g++.old-deja/g++.mike/p785.C
index 2188707cade..7d61b093edd 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/p785.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p785.C
@@ -6883,7 +6883,8 @@ and this notice must be preserved on all copies.
typedef void (*GctNameRefProcedure)(GctNameRef&);
typedef GctNameRef (*GctNameRefMapper)(GctNameRef&);
-typedef GctNameRef (*GctNameRefCombiner)(GctNameRef&, GctNameRef&);
+typedef GctNameRef& (*GctNameRefCombiner)(const GctNameRef&,
+ const GctNameRef&);
typedef int (*GctNameRefPredicate)(GctNameRef&);
typedef int (*GctNameRefComparator)(GctNameRef&, GctNameRef&);
@@ -6916,11 +6917,11 @@ public:
GctNameRefList();
GctNameRefList(GctNameRef& head);
GctNameRefList(GctNameRef& head, GctNameRefList& tl);
- GctNameRefList(GctNameRefList& a);
+ GctNameRefList(const GctNameRefList& a);
GctNameRefList(Pix p);
~GctNameRefList();
- GctNameRefList& operator = (GctNameRefList& a);
+ GctNameRefList& operator = (const GctNameRefList& a);
int null();
int valid();
@@ -7003,11 +7004,11 @@ inline void dereference(GctNameRefListNode* p)
}
-inline GctNameRefListNode* newGctNameRefListNode(GctNameRef& h)
+inline GctNameRefListNode* newGctNameRefListNode(const GctNameRef& h)
{
GctNameRefListNode* p = new GctNameRefListNode;
p->ref = 1;
- p->hd = h;
+ p->hd = (GctNameRef&) h;
return p;
}
@@ -7048,9 +7049,10 @@ inline GctNameRefList::GctNameRefList(GctNameRef& head, GctNameRefList& tl)
reference(P->tl);
}
-inline GctNameRefList::GctNameRefList(GctNameRefList& a)
+inline GctNameRefList::GctNameRefList(const GctNameRefList& a)
{
- reference(a.P);
+ GctNameRefList& gl = (GctNameRefList&) a;
+ reference(gl.P);
P = a.P;
}
@@ -7151,7 +7153,7 @@ public:
static init_NilGctNameRefListNode NilGctNameRefListNode_initializer;
-GctNameRefList& GctNameRefList::operator = (GctNameRefList& a)
+GctNameRefList& GctNameRefList::operator = (const GctNameRefList& a)
{
reference(a.P);
dereference(P);
diff --git a/gcc/testsuite/g++.old-deja/g++.other/using1.C b/gcc/testsuite/g++.old-deja/g++.other/using1.C
index 9e5615fa2c1..d22d512f64b 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/using1.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/using1.C
@@ -2,7 +2,7 @@ class D2;
class B {
private:
- int a;
+ int a; // ERROR - B::a is private
protected:
int b;
@@ -13,7 +13,7 @@ class D : public B {
public:
using B::a;
using B::b;
-};
+}; // ERROR - within this context
class D2 : public B {
public:
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit12.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit12.C
index 83ebcc16cc7..0defb196116 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/explicit12.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit12.C
@@ -5,11 +5,13 @@ struct S
{
template <class T>
void foo(T t);
-
- template <>
- void foo<int>(int) {}
};
+
+template <>
+template <>
+void S<char*>::foo<int>(int) {}
+
int main()
{
S<char*> s;
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit13.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit13.C
index 73e0e19e85f..fbb79013038 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/explicit13.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit13.C
@@ -7,13 +7,14 @@ struct S
template <class T>
void foo(T t);
- template <>
- void foo(int) { }
-
template <class T>
void bar(T t) { this->template foo<U>(3.74); }
};
+template <>
+template <>
+void S<int>::foo(int) { }
+
int main()
{
S<int> s;
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit34.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit34.C
index 487525eb933..0aede3824bd 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/explicit34.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit34.C
@@ -4,7 +4,7 @@ template <class T>
void foo(T t);
template <>
-void foo(int) {};
+void foo(int) {}; // ERROR - previously defined here.
template <>
void foo<int>(int) {} // ERROR - duplicate specialization.
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit35.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit35.C
index 9f714427459..c9282632aa1 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/explicit35.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit35.C
@@ -4,11 +4,11 @@ struct S
{
template <class T>
void foo(T t);
-
- template <>
- void foo<int>(int i) { }
};
+template <>
+void S::foo<int>(int i) { }
+
int main()
{
S s;
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit7.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit7.C
deleted file mode 100644
index 9f714427459..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.pt/explicit7.C
+++ /dev/null
@@ -1,16 +0,0 @@
-// Build don't run:
-// GROUPS passed templates
-struct S
-{
- template <class T>
- void foo(T t);
-
- template <>
- void foo<int>(int i) { }
-};
-
-int main()
-{
- S s;
- s.template foo<int>(3.0);
-}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/instantiate1.C b/gcc/testsuite/g++.old-deja/g++.pt/instantiate1.C
index 1d9c7580a68..11f9c781988 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/instantiate1.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/instantiate1.C
@@ -1,7 +1,7 @@
// Build don't link:
template <class T>
-void f(T t);
+void f(T t) {}
template void f<int>(int);
template void f<>(long);
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memclass7.C b/gcc/testsuite/g++.old-deja/g++.pt/memclass7.C
index 08166b0220d..1a5cabe67a1 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/memclass7.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/memclass7.C
@@ -4,12 +4,13 @@ struct S
struct Y {
template <class T>
void foo(T t);
-
- template <>
- void foo<int>(int i) { }
};
};
+template <>
+template <>
+void S::Y<char>::foo<int>(int i) { }
+
int main()
{
S::Y<char> s;
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memclass8.C b/gcc/testsuite/g++.old-deja/g++.pt/memclass8.C
index c0bf0cd83ab..431d41d64e8 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/memclass8.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/memclass8.C
@@ -4,7 +4,7 @@ template <class T>
class S
{
template <class U>
- class S2 {
+ struct S2 {
S2(const S2<U>& s2u) {}
};
};
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memtemp60.C b/gcc/testsuite/g++.old-deja/g++.pt/memtemp60.C
index 99e4f7299eb..7358d7225f7 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/memtemp60.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/memtemp60.C
@@ -1,7 +1,7 @@
// Build don't link:
// GROUPS passed membertemplates
template <class T>
-class S
+struct S
{
S(const S<T>& x) {}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memtemp61.C b/gcc/testsuite/g++.old-deja/g++.pt/memtemp61.C
index d67da394c3e..1fdb055b357 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/memtemp61.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/memtemp61.C
@@ -4,9 +4,6 @@ struct S
{
template <class T>
void foo(T t);
-
- template <>
- void foo(int i);
};
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memtemp62.C b/gcc/testsuite/g++.old-deja/g++.pt/memtemp62.C
index 2efd4d6d73c..8cfadeffd3e 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/memtemp62.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/memtemp62.C
@@ -4,9 +4,6 @@ struct S
{
template <class T>
void foo(T t);
-
- template <>
- void foo(int i);
};
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memtemp71.C b/gcc/testsuite/g++.old-deja/g++.pt/memtemp71.C
index f3b72be28cc..38cf5c78549 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/memtemp71.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/memtemp71.C
@@ -3,4 +3,4 @@
class A
{
template<class T>T epsilon; // ERROR - invalid member template
-}; // ERROR - the compiler crashes here
+};
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/redecl1.C b/gcc/testsuite/g++.old-deja/g++.pt/redecl1.C
index 7bc3eaae26b..283d83f2aff 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/redecl1.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/redecl1.C
@@ -6,7 +6,7 @@ struct S1; // ERROR - previous declaration
template <class T, class U>
struct S1 {}; // ERROR - used 1 template parameter
-template <class T = int>
+template <class T = int> // ERROR - original def of default
struct S2;
template <class T = int>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec10.C b/gcc/testsuite/g++.old-deja/g++.pt/spec10.C
index 10947aa8e8c..5d53e2d76b1 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/spec10.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/spec10.C
@@ -5,14 +5,15 @@ struct S
{
template <int i>
int f(int j) { abort(); return 0; }
-
- template <>
- int f<7>(int j) { return j + 7; }
-
- template <>
- int f<8>(int j) { return j + 8; }
};
+template <>
+template <>
+int S<double>::f<7>(int j) { return j + 7; }
+
+template <>
+template <>
+int S<double>::f<8>(int j) { return j + 8; }
int main()
{
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec11.C b/gcc/testsuite/g++.old-deja/g++.pt/spec11.C
index 4369f18f15a..340b58e73ec 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/spec11.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/spec11.C
@@ -7,9 +7,9 @@ struct S
int f(U u);
};
-template <class T>
template <>
-int S<T>::f(int i) { return 1; }
+template <>
+int S<char>::f(int i) { return 1; }
int main()
{
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec12.C b/gcc/testsuite/g++.old-deja/g++.pt/spec12.C
index 71676ff6cbc..d9c39654e93 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/spec12.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/spec12.C
@@ -8,9 +8,9 @@ struct S
};
-template <class T>
template <>
-int S<T>::f<int>(int i) { return 1; }
+template <>
+int S<char>::f<int>(int i) { return 1; }
int main()
{
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec13.C b/gcc/testsuite/g++.old-deja/g++.pt/spec13.C
index 8f94570db84..e5748f56c14 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/spec13.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/spec13.C
@@ -14,11 +14,11 @@ struct S1
template <class T>
void f(T* t);
-
- template <>
- void f(int* ip) {}
};
+template <>
+void S1::f(int* ip) {}
+
template <class U>
struct S2
{
@@ -27,11 +27,12 @@ struct S2
template <class T>
void f(T* t);
-
- template <>
- void f(int* ip) {}
};
+template <>
+template <>
+void S2<double>::f(int* ip) {}
+
int main()
{
int* ip;
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec15.C b/gcc/testsuite/g++.old-deja/g++.pt/spec15.C
index 0aec14336af..2e97b046265 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/spec15.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/spec15.C
@@ -28,9 +28,9 @@ struct S3
static int h(U);
};
-template <class T>
template <>
-int S3<T>::h(int) { return 0; }
+template <>
+int S3<double>::h(int) { return 0; }
template <>
template <>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec6.C b/gcc/testsuite/g++.old-deja/g++.pt/spec6.C
index b41ad9d8da6..4ef8e651594 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/spec6.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/spec6.C
@@ -4,21 +4,23 @@ struct S1
{
template <class T>
void f(T t1, T t2);
-
- template <>
- void f(int i1, int i2);
};
+
+template <>
+void S1::f(int i1, int i2);
+
template <class U>
struct S2
{
template <class T>
void f(T t1, T t2);
-
- template <>
- void f(int i1, int i2);
};
+template <>
+template <>
+void S2<char>::f(int i1, int i2);
+
void h()
{
S1 s1;
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/t05.C b/gcc/testsuite/g++.old-deja/g++.pt/t05.C
index 888f1de95ea..ea68d725b0b 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/t05.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/t05.C
@@ -1,9 +1,5 @@
-// Build don't link:
-
-template <class A> class B {
- A a;
- public:
- B(A&aa); // ERROR -
- ~B();
-};
-static B<int> b_int (3); // ERROR -
+template <class A> class B {
+ A a;
+ B(A&aa); // ERROR - near match
+}; // ERROR - candidates
+static B<int> b_int (3); // ERROR - no matching function
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp3.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp3.C
index db22c6f0c65..9a047a846f0 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/ttp3.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp3.C
@@ -5,7 +5,7 @@ template<class E,class F> class D
};
template<template<class> class D,class E> class C
-{ // ERROR - ref below
+{
};
int main()
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/typedef1.C b/gcc/testsuite/g++.old-deja/g++.pt/typedef1.C
index 5de152ef7dc..8d674c9f127 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/typedef1.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/typedef1.C
@@ -2,7 +2,7 @@
// Build don't link:
template <class T>
-class A
+struct A
{
typedef enum
{
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/typename3.C b/gcc/testsuite/g++.old-deja/g++.pt/typename3.C
index 4a8f05b08e3..0b19d54723e 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/typename3.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/typename3.C
@@ -1,4 +1,5 @@
// Build don't link:
+// Special g++ Options:
template <class T>
struct A
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/typename4.C b/gcc/testsuite/g++.old-deja/g++.pt/typename4.C
index 67ac939b58a..6f9362fe8e7 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/typename4.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/typename4.C
@@ -1,4 +1,5 @@
// Build don't link:
+// Special g++ Options:
template <class T>
struct A
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/typename5.C b/gcc/testsuite/g++.old-deja/g++.pt/typename5.C
index 202dadf12b6..e967d143f37 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/typename5.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/typename5.C
@@ -1,4 +1,5 @@
// Build don't link:
+// Special g++ Options:
template <class T>
struct A
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/typename6.C b/gcc/testsuite/g++.old-deja/g++.pt/typename6.C
index 4a8f05b08e3..0b19d54723e 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/typename6.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/typename6.C
@@ -1,4 +1,5 @@
// Build don't link:
+// Special g++ Options:
template <class T>
struct A
diff --git a/gcc/testsuite/g++.old-deja/old-deja.exp b/gcc/testsuite/g++.old-deja/old-deja.exp
index 87cdb2eeadc..072ed14d173 100644
--- a/gcc/testsuite/g++.old-deja/old-deja.exp
+++ b/gcc/testsuite/g++.old-deja/old-deja.exp
@@ -1,64 +1,3 @@
-# Copyright (C) 1988, 90, 91, 92, 1994, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-g++@prep.ai.mit.edu
-
-# This file was written by Rob Savoye. (rob@cygnus.com)
-
-#
-# these tests come from the original DejaGnu test suite
-# developed at Cygnus Support. If this isn't deja gnu, I
-# don't know what is...
-#
-
-# load support procs
-load_lib old-dejagnu.exp
-load_lib g++.exp
-
-
-# When a testcase doesn't have any special options, use these.
-if ![info exists DEFAULT_CXXFLAGS] {
- set DEFAULT_CXXFLAGS "-ansi -pedantic-errors"
-
-}
-
-old-dejagnu-init
-global GXX_UNDER_TEST
-
-#
-# main test loop
-#
-
-
-foreach file [lsort [find $srcdir/$subdir *.C]] {
- # If we're only testing specific files and this isn't one of them, skip it.
- if ![runtest_file_p $runtests $file] then {
- continue
- }
- verbose "Testing $file"
-
- # We don't want old-dejagnu.exp to have to know about all the global
- # variables we use. For now we tell it about CXXFLAGS and LIBS and
- # leave LDFLAGS alone.
- old-dejagnu $GXX_UNDER_TEST "$file" "" "$DEFAULT_CXXFLAGS" "-lstdc++"
-}
-
-# The framework doesn't like to see any error remnants,
-# so remove them.
-if [info exists errorInfo] then {
- unset errorInfo
-}
+set dirlen [expr [string length "$srcdir/$subdir"] + 1];
+ set tfile [string range $file $dirlen end];
+ if ![runtest_file_p $runtests $tfile] then {