]> oss.titaniummirror.com Git - msp430-gcc.git/blobdiff - gcc/testsuite/g++.old-deja/g++.law/except5.C
Imported gcc-4.4.3
[msp430-gcc.git] / gcc / testsuite / g++.old-deja / g++.law / except5.C
diff --git a/gcc/testsuite/g++.old-deja/g++.law/except5.C b/gcc/testsuite/g++.old-deja/g++.law/except5.C
deleted file mode 100644 (file)
index 18174e7..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-// Build don't link: 
-// Special g++ Options: -fexceptions
-// GROUPS passed exceptions
-// except file
-// Message-Id: <199311101607.AA11803@hsi86.hsi.com>
-// From: Grigory Tsipenyuk <grigory@hsi.com>
-// Subject: exception's bug?
-// Date: Wed, 10 Nov 1993 11:07:12 -0500
-
-#include <iostream>
-
-class X {
-        int     *a;
-        int     sz;
-public:
-        class range { }; // exception class
-        X(int s)        { a=new int[sz=s]; }
-        int& operator[](int i);
-};
-
-int& X::operator[](int i)
-{
-        if (i < 0 || i >= sz) {
-                throw range();
-        }
-        return a[i];
-}
-
-int
-main()
-{
-        X       c(10);
-        try {
-                for (int i = 0; i < 12; i++)
-                        c[i] = 1;
-        } catch (X::range) {
-                std::cerr << "invalid range\n";
-        }
-        return 0;
-}