aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>1998-02-10 20:30:13 -0500
committerJason Merrill <jason@gcc.gnu.org>1998-02-10 20:30:13 -0500
commit68ea752b164a1d1ae7840494a99716bff284cf48 (patch)
tree43a0032a6f3b84ce3fa504bbc7b4c80f44901f66
parent3ac3d9eaf106c5ad4a50819b0aab0787315e3a1d (diff)
downloadgcc-68ea752b164a1d1ae7840494a99716bff284cf48.zip
gcc-68ea752b164a1d1ae7840494a99716bff284cf48.tar.gz
gcc-68ea752b164a1d1ae7840494a99716bff284cf48.tar.bz2
new
From-SVN: r17853
-rw-r--r--gcc/testsuite/g++.old-deja/g++.bugs/900119_01.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.eh/ptr1.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.ext/memconst.C3
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/crash2.C10
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/enum5.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p11110.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/conv1.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/init3.C7
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/init4.C12
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/ptrmem1.C15
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/defarg.C10
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/nested1.C47
12 files changed, 108 insertions, 18 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900119_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900119_01.C
index 2eb8906..3c93c52 100644
--- a/gcc/testsuite/g++.old-deja/g++.bugs/900119_01.C
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900119_01.C
@@ -15,7 +15,7 @@ public:
static int class0_member_1 = 99; /* ERROR - */
int &class0_member_2 = global_int; /* ERROR - */
- class0 () : class0_member_2 (global_int) { }
+ class0 () : class0_member_2 (global_int) { } /* ERROR - */
};
@@ -24,7 +24,7 @@ struct struct0 {
static int struct0_member_1 = 99; /* ERROR - */
int &struct0_member_2 = global_int; /* ERROR - */
- struct0 () : struct0_member_2 (global_int) { }
+ struct0 () : struct0_member_2 (global_int) { } /* ERROR - */
};
// g++ does not allow unions to have more than one member with an initializer
@@ -40,7 +40,7 @@ union union1 {
union union2 {
int &union2_member_0 = global_int; /* ERROR - */
- union2 () : union2_member_0 (global_int) { }
+ union2 () : union2_member_0 (global_int) { } /* ERROR - */
};
int main () { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/ptr1.C b/gcc/testsuite/g++.old-deja/g++.eh/ptr1.C
index 2249526..9101e9e 100644
--- a/gcc/testsuite/g++.old-deja/g++.eh/ptr1.C
+++ b/gcc/testsuite/g++.old-deja/g++.eh/ptr1.C
@@ -15,7 +15,7 @@ int main()
}
catch (E *&e) {
- printf ("address of e is 0x%x\n", (long)e);
+ printf ("address of e is 0x%lx\n", (long)e);
return !(long(e) != 5 && e->x == 5);
}
return 2;
diff --git a/gcc/testsuite/g++.old-deja/g++.ext/memconst.C b/gcc/testsuite/g++.old-deja/g++.ext/memconst.C
index 5b42d8f..a49d3a0 100644
--- a/gcc/testsuite/g++.old-deja/g++.ext/memconst.C
+++ b/gcc/testsuite/g++.old-deja/g++.ext/memconst.C
@@ -12,7 +12,8 @@ public:
class foo {
private:
- const unsigned char * const dummy_key = (unsigned char*)"ThisIs a dummy!";
+ static const unsigned char * const dummy_key = (unsigned char*)"ThisIs a dummy!";
+
public:
void bar ();
};
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/crash2.C b/gcc/testsuite/g++.old-deja/g++.jason/crash2.C
deleted file mode 100644
index c16abb8..0000000
--- a/gcc/testsuite/g++.old-deja/g++.jason/crash2.C
+++ /dev/null
@@ -1,10 +0,0 @@
-// Bug: g++ crashes on this (admittedly invalid) input.
-// Special g++ Options:
-// Build don't link:
-
-class PhysicalPageId {
- const int maximum_block_numbers = 2;
- long block_number[maximum_block_numbers];
-};
-
-const PhysicalPageId shadows_physical_page_id_null = { 2, { 0, 0 } }; // ERROR - constructor initializes non-field m_b_n
diff --git a/gcc/testsuite/g++.old-deja/g++.law/enum5.C b/gcc/testsuite/g++.old-deja/g++.law/enum5.C
index 7f86e2c..0c8b0dc 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/enum5.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/enum5.C
@@ -60,8 +60,10 @@ int main()
struct Crctr
{
+ Crctr() : goop(fighter) {}
+
char dm[24], campaign[24], name[24], player[24];
- goopes goop = fighter;// ERROR - .*
+ goopes goop;
alignments alignment;
int level, maxhit, hitpoints, ac;
abitities scores;// ERROR - .*
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p11110.C b/gcc/testsuite/g++.old-deja/g++.mike/p11110.C
index 565dfb1..428486a 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/p11110.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p11110.C
@@ -5,7 +5,7 @@ class data;
class conatiner {
public:
virtual void* first ();
- virtual data* contents (void* i);
+ virtual data* contents (void* i); // ERROR - candidates
};
class user {
@@ -17,4 +17,4 @@ private:
data* user::data1() const {
return (_c.contents (_c.first)); // ERROR -
-}
+} // ERROR - control reaches end
diff --git a/gcc/testsuite/g++.old-deja/g++.other/conv1.C b/gcc/testsuite/g++.old-deja/g++.other/conv1.C
new file mode 100644
index 0000000..a558c5e
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/conv1.C
@@ -0,0 +1,6 @@
+// Build don't link:
+
+class X {
+public:
+ const operator int (); // ERROR - invalid declaration.
+};
diff --git a/gcc/testsuite/g++.old-deja/g++.other/init3.C b/gcc/testsuite/g++.old-deja/g++.other/init3.C
new file mode 100644
index 0000000..a4c6e76
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/init3.C
@@ -0,0 +1,7 @@
+// Build don't link:
+
+struct X
+{
+ static const bool is_signed = true ;
+ static const int digits = is_signed ? 8 *sizeof(wchar_t)-1 : 0;
+};
diff --git a/gcc/testsuite/g++.old-deja/g++.other/init4.C b/gcc/testsuite/g++.old-deja/g++.other/init4.C
new file mode 100644
index 0000000..9bc473f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/init4.C
@@ -0,0 +1,12 @@
+// Build don't link:
+
+class error {
+public:
+ error(int) {}
+};
+
+class foo {
+ const error x = 1; // ERROR - initialization of non-static data member
+};
+
+
diff --git a/gcc/testsuite/g++.old-deja/g++.other/ptrmem1.C b/gcc/testsuite/g++.old-deja/g++.other/ptrmem1.C
new file mode 100644
index 0000000..1b5d5df
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/ptrmem1.C
@@ -0,0 +1,15 @@
+// Build don't link:
+
+class x
+{
+public:
+ virtual int is_constant();
+};
+
+void foo()
+{
+ x* y;
+ if (y->is_constant) // ERROR - assuming &
+ {
+ }
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/defarg.C b/gcc/testsuite/g++.old-deja/g++.pt/defarg.C
new file mode 100644
index 0000000..314339d
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/defarg.C
@@ -0,0 +1,10 @@
+template <class T>
+void f(T t, int i = 10);
+
+template <class T>
+void f(T t, int i) {}
+
+int main()
+{
+ f(3);
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/nested1.C b/gcc/testsuite/g++.old-deja/g++.pt/nested1.C
new file mode 100644
index 0000000..3df7c47
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/nested1.C
@@ -0,0 +1,47 @@
+// Build don't link:
+
+template <class T1,class T2>
+struct X
+{
+ T1 a;
+
+ struct Y
+ {
+ T2 x;
+ Y (T2 _x) { x=_x; }
+ };
+
+};
+
+template <class T1>
+struct X<T1,int>
+{
+ T1 a;
+
+ struct Y
+ {
+ int x;
+ Y (int _x) { x=_x; }
+ };
+
+};
+
+template <>
+struct X<int,int>
+{
+ int a;
+
+ struct Y
+ {
+ int x;
+ Y (int _x) { x=_x; }
+ };
+
+};
+
+void f ()
+{
+ X<char,char> t1;
+ X<char,int> t2;
+ X<int,int> t3;
+}