From dc724178aaa251175e00882b073e05feaf5d1492 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 3 Jun 1998 21:49:32 -0400 Subject: [PATCH] update From-SVN: r20220 --- gcc/testsuite/g++.old-deja/g++.robertl/eb109.C | 12 ++++++------ gcc/testsuite/g++.old-deja/g++.robertl/eb118.C | 7 +++++-- gcc/testsuite/g++.old-deja/g++.robertl/eb25.C | 11 ----------- gcc/testsuite/g++.old-deja/g++.robertl/eb43.C | 4 ++-- gcc/testsuite/g++.old-deja/g++.robertl/eb44.C | 15 +++++++++++++-- gcc/testsuite/g++.old-deja/g++.robertl/eb58.C | 2 +- gcc/testsuite/g++.old-deja/g++.robertl/eb76.C | 6 +++--- gcc/testsuite/g++.old-deja/g++.robertl/eb78.C | 2 +- 8 files changed, 31 insertions(+), 28 deletions(-) delete mode 100644 gcc/testsuite/g++.old-deja/g++.robertl/eb25.C diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C index 88bab1e49441..dd9e0e53f84f 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C @@ -39,19 +39,19 @@ template ostream& operator<<(ostream& os, Graph& G) { // display of vertices with successors - for(int i = 0; i < G.size(); ++i) + for(int i = 0; i < G.size(); ++i) // ERROR - no size function { - os << G[i].first << " <"; + os << G[i].first << " <"; // ERROR - no index operator // The compiler does not like this line!!!!!! typename Graph::Successor::iterator - startN = G[i].second.begin(), - endN = G[i].second.end(); + startN = G[i].second.begin(), // ERROR - no index operator + endN = G[i].second.end(); // ERROR - no index operator while(startN != endN) { os << G[(*startN).first].first << ' ' // vertex - << (*startN).second << ' '; // edge value + << (*startN).second << ' '; // ERROR - no index operator ++startN; } os << ">\n"; @@ -62,7 +62,7 @@ ostream& operator<<(ostream& os, Graph& G) int main() { // no edge weighting, therefore type Empty: - Graph V(true); // directed + Graph V(true); // ERROR - no bool constructor // ReadGraph(V, "gra1.dat"); // display of vertices with successors diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb118.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb118.C index de0b3fe13958..23498c785547 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb118.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb118.C @@ -1,3 +1,6 @@ +// Test for obsolete specialization syntax. Turn off -pedantic. +// Special g++ Options: + #include #include @@ -14,11 +17,11 @@ A::test(){ } // Specialization declaration void -A::test(); // ERROR - not a specialization +A::test(); // Specialization definition void -A::test(){ // ERROR - not a specialization +A::test(){ cerr << "specialization for " << typeid(*this).name() << endl; } diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb25.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb25.C deleted file mode 100644 index a52b436507ff..000000000000 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb25.C +++ /dev/null @@ -1,11 +0,0 @@ -//Build don't link: -//Neither stack nor vector provide priority_queue, use instead -#include -#include - - -int main() -{ - priority_queue< int, vector, greater > pq; // ERROR - unknown template - return 0; -} diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb43.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb43.C index 8ae65023b12e..80a7a0674f9d 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb43.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb43.C @@ -4,8 +4,8 @@ template class Expr { public : -Expr(){}; -Expr(const T&){}; + Expr(){}; + Expr(const T&){}; }; template diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb44.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb44.C index 8a60df42abd8..19c4bbf00ff7 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb44.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb44.C @@ -1,4 +1,8 @@ // spurious 'const' in error. +// For egcs-2.91.34, the warning message refers to +// class ostream & operator <<(class ostream &, const class Vector &) +// Also, the template instantiation does not provide the missing +// friend function, the non-template function does #include #include @@ -6,16 +10,23 @@ template class Vector { - friend ostream& operator<< (ostream& out, const Vector & vec); + friend ostream& operator<< (ostream& out, const Vector & vec); // WARNING - }; template ostream& operator<< (ostream& out, const Vector & vec) -{} +{ + abort(); // this should not be called +} template class Vector; template ostream& operator<< (ostream& out, const Vector &); +ostream& operator<< (ostream& out, const Vector&) +{ + return out; +} + main() { Vector vc; diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb58.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb58.C index 0691d553c9f2..3612034bf703 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb58.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb58.C @@ -10,5 +10,5 @@ private: main() { - A *list = new A[10](4); //ERROR - + A *list = new A[10](4); } diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb76.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb76.C index 446a9e06a00b..80cccc8a0d3b 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb76.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb76.C @@ -6,8 +6,8 @@ inline bool operator!=(const T& x, const T& y) { } enum T { - V1, -}; //ERROR - comma at end of enumerator list + V1 +}; struct X { T t : 31; @@ -15,6 +15,6 @@ struct X { void f(X& v) { - if( v.t != V1 ) { + if( v.t != V1 ) { // gets bogus error - address of bitfield } } diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb78.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb78.C index 3221d86c4aa1..15f26318efbd 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb78.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb78.C @@ -95,7 +95,7 @@ void UserClass::f(const String& filename) throw(BadFileName) { try { - File f(filename); + File f(filename); // WARNING - unused } catch (const AccessViolation& e) { cout << " FULLY recover from access-violation\n"; -- 2.43.5