diff options
author | Jason Merrill <jason@gcc.gnu.org> | 1998-05-26 07:43:44 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-05-26 07:43:44 -0400 |
commit | 97cf4d2d5d05615ab610302adde25adc6d252b87 (patch) | |
tree | ac9b95562cc5f27c8e62090a611e49e67dce7a48 | |
parent | 276ca6eaf8623ff4cda3416018f5885968791eb7 (diff) | |
download | gcc-97cf4d2d5d05615ab610302adde25adc6d252b87.zip gcc-97cf4d2d5d05615ab610302adde25adc6d252b87.tar.gz gcc-97cf4d2d5d05615ab610302adde25adc6d252b87.tar.bz2 |
new
From-SVN: r20060
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.ns/anon1.C | 12 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.ns/invalid1.C | 12 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/typedef2.C | 10 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/typedef3.C | 14 |
4 files changed, 48 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.ns/anon1.C b/gcc/testsuite/g++.old-deja/g++.ns/anon1.C new file mode 100644 index 0000000..c4a242a --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.ns/anon1.C @@ -0,0 +1,12 @@ +namespace{ + void f(); +} + +int main() +{ + f(); +} + +namespace{ + void f(){} +} diff --git a/gcc/testsuite/g++.old-deja/g++.ns/invalid1.C b/gcc/testsuite/g++.old-deja/g++.ns/invalid1.C new file mode 100644 index 0000000..76d3d70 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.ns/invalid1.C @@ -0,0 +1,12 @@ +//Build don't link: +namespace x { }; + +void f(int); + +int main() +{ + x(); // ERROR - calling a namespace + x=4; // ERROR - assigning to a namespace + f(x); // ERROR - passing a namespace as parameter +} + diff --git a/gcc/testsuite/g++.old-deja/g++.other/typedef2.C b/gcc/testsuite/g++.old-deja/g++.other/typedef2.C new file mode 100644 index 0000000..b12ed13 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/typedef2.C @@ -0,0 +1,10 @@ +//Build don't link: +struct S{ + + static const int i; + static const int j; +}; + +typedef S T; +const int T::i = 4; +const int T::j = 4; diff --git a/gcc/testsuite/g++.old-deja/g++.other/typedef3.C b/gcc/testsuite/g++.old-deja/g++.other/typedef3.C new file mode 100644 index 0000000..465e9a0 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/typedef3.C @@ -0,0 +1,14 @@ +//Build don't link: +template<class T> +struct X{ + T v; + X(){} + virtual ~X(){} + virtual inline T f(T x){return x;} +}; + +void f() +{ + typedef int H; + X<H> y; +} |