aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Lipe <robertl@gcc.gnu.org>1998-06-01 09:09:55 +0000
committerRobert Lipe <robertl@gcc.gnu.org>1998-06-01 09:09:55 +0000
commitd146c305b2a61fc15885e3d9ccbe4b73b0fcf4b4 (patch)
tree51390b62adce9c36344044096991e53750318d23
parent8e54705d55273a3621964e314746cb673e10cadd (diff)
downloadgcc-d146c305b2a61fc15885e3d9ccbe4b73b0fcf4b4.zip
gcc-d146c305b2a61fc15885e3d9ccbe4b73b0fcf4b4.tar.gz
gcc-d146c305b2a61fc15885e3d9ccbe4b73b0fcf4b4.tar.bz2
Additional changes from Martin.
From-SVN: r20167
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb121.C8
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb42.C1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb43.C15
3 files changed, 5 insertions, 19 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C
index 1f003f3..86be02a 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C
@@ -1,14 +1,14 @@
-// Compiles. Shouldn't.
+//Build don't link:
class A {
private:
int i1_;
public:
- void f(int const i1 = 1);
+ void f(int const i1 = 1); // ERROR -
};
void
-A::f(int const i1 = 1) // !!! SHOULD TRIGGER AN ERROR !!!
-{
+A::f(int const i1 = 1)
+{ // ERROR - duplicate default argument
i1_ = i1;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb42.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb42.C
index 6d15ec7..8850f9f 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb42.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb42.C
@@ -1,3 +1,4 @@
+//Build don't link:
#include <vector.h>
#include <algo.h>
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb43.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb43.C
index deba6cb..8ae6502 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb43.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb43.C
@@ -8,41 +8,26 @@ Expr(){};
Expr(const T&){};
};
-#ifdef TEMPLATE
template <class T >
inline bool compare(const Expr<T> a, const Expr<T> b){ return true; };
-#else
-inline bool compare(const Expr<int> a, const Expr<int> b){ return true; };
-#endif
void main()
{
vector<int> a(3);
-#if TEMPLATE == 1
sort( a.begin(), a.end(),
static_cast<bool (*)(const Expr<int>,const Expr<int>)>(compare) );
-#elif TEMPLATE == 2
sort( a.begin(), a.end(), compare<int> );
-#elif TEMPLATE == 3
sort<vector<int>::iterator,
pointer_to_binary_function<const Expr<int>, const Expr<int>, bool> >
( a.begin(), a.end(), compare );
-#elif TEMPLATE == 4
sort( a.begin(), a.end(),
ptr_fun<const Expr<int>, const Expr<int>, bool> (compare) );
-#elif TEMPLATE == 5
sort( a.begin(), a.end(),
ptr_fun(compare<int>) );
-#elif TEMPLATE == 6
sort( a.begin(), a.end(),
pointer_to_binary_function<const Expr<int>, const Expr<int>, bool>(compare) );
-#elif TEMPLATE == 7
sort( a.begin(), a.end(),
pointer_to_binary_function<const Expr<int>, const Expr<int>, bool>(compare<int>) );
-#elif TEMPLATE == 8
sort( a.begin(), a.end(),
pointer_to_binary_function<const Expr<int>, const Expr<int>, bool>(compare<>) );
-#else
- sort( a.begin(), a.end(), compare );
-#endif
}