diff options
author | Jason Merrill <jason@gcc.gnu.org> | 1998-05-11 07:57:04 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-05-11 07:57:04 -0400 |
commit | a4d95b976d1232b4ab338194c18900da083a4781 (patch) | |
tree | 07dc8c01c2e6b54518d2cf806a0fab244c875fb0 | |
parent | 4c7d0dff68bc86c6af9a030655ea901a4219ec1e (diff) | |
download | gcc-a4d95b976d1232b4ab338194c18900da083a4781.zip gcc-a4d95b976d1232b4ab338194c18900da083a4781.tar.gz gcc-a4d95b976d1232b4ab338194c18900da083a4781.tar.bz2 |
new
From-SVN: r19672
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.mike/ns15.C | 31 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.mike/s9959.C | 20 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/redecl1.C | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/using2.C | 10 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/using3.C | 12 |
5 files changed, 79 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/ns15.C b/gcc/testsuite/g++.old-deja/g++.mike/ns15.C new file mode 100644 index 0000000..3944052 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.mike/ns15.C @@ -0,0 +1,31 @@ +// Build don't link: + +#include <stdio.h> +#include <stdlib.h> + +#define MAX 256 +#define MAXSTATE 1000000 + +struct R { + int count; + int state1; + int state2; +}; + +int cmp_d(const R* a, const R* b) { + return a->count > b->count; +} + +namespace CXX { + template<class T, int i1, int i2> + inline void qsort (T b[i1][i2], int (*cmp)(const T*, const T*)) { + ::qsort ((void*)b, i1*i2, sizeof(T), (int (*)(const void *, const void *))cmp); + } +} + +using namespace CXX; + +void sort_machine() { + struct R d[MAX][MAX]; + qsort<R,MAX> (d, cmp_d); +} diff --git a/gcc/testsuite/g++.old-deja/g++.mike/s9959.C b/gcc/testsuite/g++.old-deja/g++.mike/s9959.C new file mode 100644 index 0000000..654f7d5 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.mike/s9959.C @@ -0,0 +1,20 @@ +// Build don't link: + +class A { +protected: + int aData; +}; + +class B : public A { +public: + virtual void func1() { + A::aData = 1; + } +}; + +class C : virtual public B { +public: + virtual void func1(void) { + A::aData = 2; + } +}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/redecl1.C b/gcc/testsuite/g++.old-deja/g++.other/redecl1.C new file mode 100644 index 0000000..6e25a9a --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/redecl1.C @@ -0,0 +1,6 @@ +//Build don't link: +struct X{ + void i(); // ERROR - + void i(int); + int i; // ERROR - conflict +}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/using2.C b/gcc/testsuite/g++.old-deja/g++.other/using2.C new file mode 100644 index 0000000..41887c4 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/using2.C @@ -0,0 +1,10 @@ +// Build don't link: +struct X{ + void f(); +}; + +struct Y:X{ + void f(int); + void f(); + using X::f; // ERROR - conflict +}; // ERROR - diff --git a/gcc/testsuite/g++.old-deja/g++.other/using3.C b/gcc/testsuite/g++.old-deja/g++.other/using3.C new file mode 100644 index 0000000..7d75d8a --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/using3.C @@ -0,0 +1,12 @@ +// Build don't link: +struct A{ + A(); +}; + +typedef struct { + A i; +} S; + +struct B: S{ + using S::S; // ERROR - no such field +}; |