OSDN Git Service

x
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 21 Jul 1999 08:53:38 +0000 (08:53 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 21 Jul 1999 08:53:38 +0000 (08:53 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28205 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/g++.old-deja/g++.brendan/crash5.C
gcc/testsuite/g++.old-deja/g++.ext/addrfunc4.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.jason/builtin2.C
gcc/testsuite/g++.old-deja/g++.jason/thunk3.C
gcc/testsuite/g++.old-deja/g++.mike/net5.C
gcc/testsuite/g++.old-deja/g++.other/overcnv2.C
gcc/testsuite/g++.old-deja/g++.pt/parms1.C [moved from gcc/testsuite/g++.old-deja/g++.jason/tpt-1.cc with 99% similarity]
gcc/testsuite/g++.old-deja/g++.pt/static3.C

index 0e82e16..e415967 100644 (file)
@@ -7,8 +7,6 @@
 //     * cp-cvt.c (build_default_binary_type_conversion): Look deeper into
 //     what ARG1 and ARG2 are if they're POINTER_TYPEs.
 
-volatile void exit(int);
-
 class CountableSet
 {
        public:
@@ -71,7 +69,7 @@ class SimpleSet : virtual public MutSet<T>
                SimpleSet()
                {
                        size = 0;
-                       array = ((void*)0) ; // ERROR - implicit conversion
+                       array = 0;
                }
                int     Get(int p, T& t)
                {
diff --git a/gcc/testsuite/g++.old-deja/g++.ext/addrfunc4.C b/gcc/testsuite/g++.old-deja/g++.ext/addrfunc4.C
new file mode 100644 (file)
index 0000000..b8d02f7
--- /dev/null
@@ -0,0 +1,24 @@
+// Test that an object-dependent reference to a member function can be
+// used to produce a pointer to member function, as in VC++.
+// Contributed by Jason Merrill <jason@cygnus.com>
+// Special g++ Options: -fpermissive -w
+
+struct A
+{
+  int  f(int a) { }
+  void f(int a, int b) { }
+};
+
+typedef int  (A::* pmf1)(int);
+typedef void (A::* pmf2)(int, int);
+
+int main()
+{
+  A a;
+  pmf1 fn1;
+  pmf2 fn2;
+
+  fn1 = a.f; 
+  fn1 = (pmf1)a.f;
+  fn2 = (pmf2)a.f;
+};
index 698d0a1..e48e189 100644 (file)
@@ -1,6 +1,6 @@
 // Build don't link:
 
-inline void strlen (const char *) { }
+static inline void strlen (const char *) { }
 
 void f ()
 {
index 5127b9b..3e2bf74 100644 (file)
@@ -3,7 +3,7 @@
 //  support, because it doesn't support variadic functions.
 
 // Special g++ Options: -fvtable-thunks
-// excess errors test - XFAIL mips*-*-* rs6000-*-* powerpc-*-eabi m68k-*-coff m68k-motorola-sysv m88k-motorola-sysv3  mn10300-*-* mn10200-*-* v850-*-* sh-*-*-*
+// excess errors test - XFAIL mips*-*-* rs6000-*-* powerpc-*-eabi m68k-*-coff m68k-motorola-sysv m88k-motorola-sysv3  mn10300-*-* mn10200-*-* v850-*-* sh-*-*
 
 #include <stdarg.h>
 
index e914432..064c73c 100644 (file)
@@ -1,7 +1,7 @@
 // Build don't link:
 // Special g++ Options:
 
-volatile void abort();
+volatile void abort();         // WARNING - mismatch
 volatile void oink() {
   abort() ;
 }                              // gets bogus error - 
index 725ce09..f8ef3d3 100644 (file)
@@ -4,7 +4,7 @@
 // the type of the argument -- but because it is non-const.
 
 struct A  {
-  operator const char *() const;
+  operator const char *() const { return ""; }
 };
 
 struct B : public A {
@@ -14,5 +14,10 @@ struct B : public A {
 int main()
 {
   B b;
-  (const char *)b;             // WARNING - surprising overload resolution
+  if ((const char *)b != 0)  // WARNING - surprising overload resolution
+    return 1;
+  if ((const char *)(const B)b == 0)
+    return 2;
+  if ((const char *)(const B &)b == 0)
+    return 3;
 }
similarity index 99%
rename from gcc/testsuite/g++.old-deja/g++.jason/tpt-1.cc
rename to gcc/testsuite/g++.old-deja/g++.pt/parms1.C
index 1509520..65330c6 100644 (file)
@@ -18,6 +18,7 @@ public:
     operator S () { return a*20; }
 };
 
+int
 main()
 {
     A<int, 5> a;
index 6fe33f9..8072a60 100644 (file)
@@ -1,6 +1,6 @@
 // On targets that don't support weak symbols, we require an explicit
 // instantiation of arr.
-// excess errors test - XFAIL *-*-aout *-*-coff *-*-hpux*
+// excess errors test - XFAIL *-*-aout *-*-coff *-*-hpux* alpha-dec-osf*
 
 template<class T>
 struct A {