Pick up a few scraggling files that missed my first add/commit cycle.
authorRobert Lipe <robertl@gcc.gnu.org>
Fri, 29 May 1998 08:10:44 +0000 (08:10 +0000)
committerRobert Lipe <robertl@gcc.gnu.org>
Fri, 29 May 1998 08:10:44 +0000 (08:10 +0000)
From-SVN: r20138

gcc/testsuite/g++.old-deja/g++.robertl/ebnull-cast.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.robertl/ebnull-oldcast.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.robertl/ebnull.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/ebnull-cast.C b/gcc/testsuite/g++.old-deja/g++.robertl/ebnull-cast.C
new file mode 100644 (file)
index 0000000..d220e90
--- /dev/null
@@ -0,0 +1,18 @@
+class null {
+    null (null const&);
+    void operator& ();
+
+  public:
+    null () {}
+
+    template <typename T>
+    operator T* () const { return 0; }
+} const null;
+
+
+int main ()
+{
+    int *p = static_cast<int*>(null);
+
+    return 0;
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/ebnull-oldcast.C b/gcc/testsuite/g++.old-deja/g++.robertl/ebnull-oldcast.C
new file mode 100644 (file)
index 0000000..cf6c21b
--- /dev/null
@@ -0,0 +1,17 @@
+class null {
+    null (null const&);
+    void operator& ();
+
+  public:
+    null () {}
+
+    template <typename T>
+    operator T* () const { return 0; }
+} const null;
+
+int main ()
+{
+    int *p = (int*) null;
+
+    return 0;
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/ebnull.C b/gcc/testsuite/g++.old-deja/g++.robertl/ebnull.C
new file mode 100644 (file)
index 0000000..e6eea2d
--- /dev/null
@@ -0,0 +1,17 @@
+class null {
+    null (null const&);
+    void operator& ();
+
+  public:
+    null () {}
+
+    template <typename T>
+    operator T* () const { return 0; }
+} const null;
+
+int main ()
+{
+    int *p = null;
+
+    return 0;
+}