aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>1998-06-03 21:49:32 -0400
committerJason Merrill <jason@gcc.gnu.org>1998-06-03 21:49:32 -0400
commitdc724178aaa251175e00882b073e05feaf5d1492 (patch)
treec49c80aaa46ebe401df45cf750344e6d20365e00
parent1813dd7bdda13acd52ff7856b6a3e200b28836d8 (diff)
downloadgcc-dc724178aaa251175e00882b073e05feaf5d1492.zip
gcc-dc724178aaa251175e00882b073e05feaf5d1492.tar.gz
gcc-dc724178aaa251175e00882b073e05feaf5d1492.tar.bz2
update
From-SVN: r20220
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb109.C12
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb118.C7
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb25.C11
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb43.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb44.C15
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb58.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb76.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb78.C2
8 files changed, 31 insertions, 28 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C
index 88bab1e..dd9e0e5 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<class VertexType, class EdgeType>
ostream& operator<<(ostream& os, Graph<VertexType,EdgeType>& 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<VertexType, EdgeType>::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<VertexType,EdgeType>& G)
int main()
{
// no edge weighting, therefore type Empty:
- Graph<string, Empty> V(true); // directed
+ Graph<string, Empty> 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 de0b3fe..23498c7 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 <iostream.h>
#include <typeinfo>
@@ -14,11 +17,11 @@ A<T>::test(){
}
// Specialization declaration
void
-A<double>::test(); // ERROR - not a specialization
+A<double>::test();
// Specialization definition
void
-A<double>::test(){ // ERROR - not a specialization
+A<double>::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 a52b436..0000000
--- 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 <queue> instead
-#include <stack>
-#include <vector>
-
-
-int main()
-{
- priority_queue< int, vector<int>, greater<int> > 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 8ae6502..80a7a06 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 T> class Expr
{
public :
-Expr(){};
-Expr(const T&){};
+ Expr(){};
+ Expr(const T&){};
};
template <class T >
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb44.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb44.C
index 8a60df4..19c4bbf 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<T> &)
+// Also, the template instantiation does not provide the missing
+// friend function, the non-template function does
#include <stdio.h>
#include <iostream.h>
@@ -6,16 +10,23 @@
template <class T>
class Vector
{
- friend ostream& operator<< (ostream& out, const Vector<T> & vec);
+ friend ostream& operator<< (ostream& out, const Vector<T> & vec); // WARNING -
};
template <class T>
ostream& operator<< (ostream& out, const Vector<T> & vec)
-{}
+{
+ abort(); // this should not be called
+}
template class Vector<char>;
template ostream& operator<< (ostream& out, const Vector<char> &);
+ostream& operator<< (ostream& out, const Vector<char>&)
+{
+ return out;
+}
+
main()
{
Vector<char> vc;
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb58.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb58.C
index 0691d55..3612034 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 446a9e0..80cccc8 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 3221d86..15f2631 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";