new
authorJason Merrill <jason@gcc.gnu.org>
Wed, 11 Feb 1998 01:30:13 +0000 (20:30 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 11 Feb 1998 01:30:13 +0000 (20:30 -0500)
From-SVN: r17853

12 files changed:
gcc/testsuite/g++.old-deja/g++.bugs/900119_01.C
gcc/testsuite/g++.old-deja/g++.eh/ptr1.C
gcc/testsuite/g++.old-deja/g++.ext/memconst.C
gcc/testsuite/g++.old-deja/g++.jason/crash2.C [deleted file]
gcc/testsuite/g++.old-deja/g++.law/enum5.C
gcc/testsuite/g++.old-deja/g++.mike/p11110.C
gcc/testsuite/g++.old-deja/g++.other/conv1.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/init3.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/init4.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/ptrmem1.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.pt/defarg.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.pt/nested1.C [new file with mode: 0644]

index 2eb8906ddd1d4c07495e9584eb574bb26031b03f..3c93c5259971fcf70d9b98a2c256c0b93ea153df 100644 (file)
@@ -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; }
index 224952655ba99729c06a4eab4df107099257eb24..9101e9e3010a6a0f82208138e76194085fb388d2 100644 (file)
@@ -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;
index 5b42d8ff90552cab924bbf568b6787fe898111fb..a49d3a058982997fb9dbaeeae726269bfeae0a79 100644 (file)
@@ -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 (file)
index c16abb8..0000000
+++ /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
index 7f86e2c0eb76a813a3a9ccbce7b0762de2e5c374..0c8b0dc5bef45624b4fc113ae3e678099d5f47aa 100644 (file)
@@ -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 - .*
index 565dfb15855b9de5b50c29b7960432307f9345ba..428486a50422e3043e65fd67e1dc94d124ea7018 100644 (file)
@@ -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 (file)
index 0000000..a558c5e
--- /dev/null
@@ -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 (file)
index 0000000..a4c6e76
--- /dev/null
@@ -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 (file)
index 0000000..9bc473f
--- /dev/null
@@ -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 (file)
index 0000000..1b5d5df
--- /dev/null
@@ -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 (file)
index 0000000..314339d
--- /dev/null
@@ -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 (file)
index 0000000..3df7c47
--- /dev/null
@@ -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;  
+}