author | Jesse Butler <jesse.butler@oracle.com> |
Mon, 17 Oct 2016 16:13:44 -0700 | |
changeset 7119 | 2f82d964b8be |
parent 402 | 94ae4d75524c |
permissions | -rw-r--r-- |
402
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
1 |
--- stdcxx-4.2.1/etc/config/src/BAD_ALLOC_COPY_CTOR.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
2 |
+++ stdcxx-4.2.1/etc/config/src/BAD_ALLOC_COPY_CTOR.cpp 2011-04-26 11:24:02.404959583 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
3 |
@@ -28,6 +28,17 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
4 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
5 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
6 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
7 |
+#if defined(__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
8 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
9 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
10 |
+int main (int argc, char *argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
11 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
12 |
+ std::bad_alloc ba0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
13 |
+ std::bad_alloc ba1 (ba0); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
14 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
15 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
16 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
17 |
+#else |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
18 |
#define TEST_COPY_CTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
19 |
#define main test_bad_alloc_copy_ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
20 |
#include "BAD_ALLOC_ASSIGNMENT.cpp" |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
21 |
@@ -37,3 +48,5 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
22 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
23 |
return test_bad_alloc_copy_ctor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
24 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
25 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
26 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
27 |
--- stdcxx-4.2.1/etc/config/src/BAD_ALLOC_DTOR.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
28 |
+++ stdcxx-4.2.1/etc/config/src/BAD_ALLOC_DTOR.cpp 2011-04-26 13:53:46.818422773 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
29 |
@@ -1,4 +1,4 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
30 |
-// checking for bad_alloc dtor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
31 |
+// checking for bad_alloc default ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
32 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
33 |
/*************************************************************************** |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
34 |
* |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
35 |
@@ -28,12 +28,29 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
36 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
37 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
38 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
39 |
-#define TEST_DTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
40 |
-#define main test_bad_alloc_dtor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
41 |
+#if defined(__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
42 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
43 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
44 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
45 |
+int main (int argc, char *argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
46 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
47 |
+ std::bad_alloc* ba = new std::bad_alloc(); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
48 |
+ ba->~bad_alloc(); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
49 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
50 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
51 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
52 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
53 |
+#else |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
54 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
55 |
+#define TEST_DEFAULT_CTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
56 |
+#define main test_bad_alloc_default_ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
57 |
#include "BAD_ALLOC_ASSIGNMENT.cpp" |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
58 |
#undef main |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
59 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
60 |
int main (int argc, char *argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
61 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
62 |
- return test_bad_alloc_dtor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
63 |
+ return test_bad_alloc_default_ctor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
64 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
65 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
66 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
67 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
68 |
--- stdcxx-4.2.1/etc/config/src/BAD_ALLOC_DEFAULT_CTOR.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
69 |
+++ stdcxx-4.2.1/etc/config/src/BAD_ALLOC_DEFAULT_CTOR.cpp 2011-04-26 11:24:02.405491280 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
70 |
@@ -28,6 +28,19 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
71 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
72 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
73 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
74 |
+#if defined(__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
75 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
76 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
77 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
78 |
+int main (int argc, char *argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
79 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
80 |
+ std::bad_alloc ba; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
81 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
82 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
83 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
84 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
85 |
+#else |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
86 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
87 |
#define TEST_DEFAULT_CTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
88 |
#define main test_bad_alloc_default_ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
89 |
#include "BAD_ALLOC_ASSIGNMENT.cpp" |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
90 |
@@ -37,3 +50,6 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
91 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
92 |
return test_bad_alloc_default_ctor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
93 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
94 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
95 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
96 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
97 |
--- stdcxx-4.2.1/etc/config/src/BAD_ALLOC_WHAT.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
98 |
+++ stdcxx-4.2.1/etc/config/src/BAD_ALLOC_WHAT.cpp 2011-04-26 11:24:02.405744059 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
99 |
@@ -1,4 +1,4 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
100 |
-// checking for bad_alloc::what() |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
101 |
+// checking for bad_alloc default ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
102 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
103 |
/*************************************************************************** |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
104 |
* |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
105 |
@@ -28,12 +28,28 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
106 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
107 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
108 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
109 |
-#define TEST_WHAT |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
110 |
-#define main test_bad_alloc_what |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
111 |
+#if defined(__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
112 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
113 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
114 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
115 |
+int main (int argc, char *argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
116 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
117 |
+ std::bad_alloc ba; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
118 |
+ const char* s = ba.what(); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
119 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
120 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
121 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
122 |
+#else |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
123 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
124 |
+#define TEST_DEFAULT_CTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
125 |
+#define main test_bad_alloc_default_ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
126 |
#include "BAD_ALLOC_ASSIGNMENT.cpp" |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
127 |
#undef main |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
128 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
129 |
int main (int argc, char *argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
130 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
131 |
- return test_bad_alloc_what (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
132 |
+ return test_bad_alloc_default_ctor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
133 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
134 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
135 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
136 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
137 |
--- stdcxx-4.2.1/etc/config/src/BAD_ALLOC_ASSIGNMENT.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
138 |
+++ stdcxx-4.2.1/etc/config/src/BAD_ALLOC_ASSIGNMENT.cpp 2011-04-26 11:24:02.406173871 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
139 |
@@ -51,6 +51,22 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
140 |
// EXCEPTION_DEFAULT_CTOR.cpp |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
141 |
// EXCEPTION_DTOR.cpp |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
142 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
143 |
+#if defined(__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
144 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
145 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
146 |
+int |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
147 |
+main(int argc, char* argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
148 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
149 |
+ std::bad_alloc ba0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
150 |
+ std::bad_alloc ba1; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
151 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
152 |
+ ba1 = ba0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
153 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
154 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
155 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
156 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
157 |
+#else // !__SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
158 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
159 |
#include "config.h" |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
160 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
161 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
162 |
@@ -129,7 +145,6 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
163 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
164 |
} // namespace std |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
165 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
166 |
- |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
167 |
// use virtual inheritance here to prevent aggressive optimizers |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
168 |
// (like VisualAge C++) from optimizing the base class dtor away |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
169 |
struct Base0: virtual std::bad_alloc |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
170 |
@@ -498,3 +513,6 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
171 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
172 |
return Base0::what (); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
173 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
174 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
175 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
176 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
177 |
--- stdcxx-4.2.1/etc/config/src/BAD_CAST_ASSIGNMENT.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
178 |
+++ stdcxx-4.2.1/etc/config/src/BAD_CAST_ASSIGNMENT.cpp 2011-04-26 13:35:36.243256145 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
179 |
@@ -28,6 +28,24 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
180 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
181 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
182 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
183 |
+#if defined(__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
184 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
185 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
186 |
+#include <typeinfo> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
187 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
188 |
+int |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
189 |
+main(int argc, char* argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
190 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
191 |
+ std::bad_cast bc0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
192 |
+ std::bad_cast bc1; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
193 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
194 |
+ bc1 = bc0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
195 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
196 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
197 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
198 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
199 |
+#else // !__SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
200 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
201 |
#define TEST_ASSIGNMENT |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
202 |
#define bad_alloc bad_cast |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
203 |
#define main test_bad_cast_assignment |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
204 |
@@ -38,3 +56,6 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
205 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
206 |
return test_bad_cast_assignment (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
207 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
208 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
209 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
210 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
211 |
--- stdcxx-4.2.1/etc/config/src/BAD_CAST_COPY_CTOR.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
212 |
+++ stdcxx-4.2.1/etc/config/src/BAD_CAST_COPY_CTOR.cpp 2011-04-26 13:37:16.280528382 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
213 |
@@ -28,6 +28,22 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
214 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
215 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
216 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
217 |
+#if defined(__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
218 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
219 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
220 |
+#include <typeinfo> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
221 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
222 |
+int |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
223 |
+main(int argc, char* argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
224 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
225 |
+ std::bad_cast bc0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
226 |
+ std::bad_cast bc1 (bc0); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
227 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
228 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
229 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
230 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
231 |
+#else // ! __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
232 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
233 |
#define TEST_COPY_CTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
234 |
#define bad_alloc bad_cast |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
235 |
#define main test_bad_cast_copy_ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
236 |
@@ -38,3 +54,6 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
237 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
238 |
return test_bad_cast_copy_ctor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
239 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
240 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
241 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
242 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
243 |
--- stdcxx-4.2.1/etc/config/src/BAD_CAST_DEFAULT_CTOR.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
244 |
+++ stdcxx-4.2.1/etc/config/src/BAD_CAST_DEFAULT_CTOR.cpp 2011-04-26 13:38:33.701096561 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
245 |
@@ -28,6 +28,21 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
246 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
247 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
248 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
249 |
+#if defined(__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
250 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
251 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
252 |
+#include <typeinfo> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
253 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
254 |
+int |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
255 |
+main(int argc, char* argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
256 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
257 |
+ std::bad_cast bc0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
258 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
259 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
260 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
261 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
262 |
+#else |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
263 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
264 |
#define TEST_DEFAULT_CTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
265 |
#define bad_alloc bad_cast |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
266 |
#define main test_bad_cast_default_ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
267 |
@@ -38,3 +53,6 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
268 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
269 |
return test_bad_cast_default_ctor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
270 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
271 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
272 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
273 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
274 |
--- stdcxx-4.2.1/etc/config/src/BAD_CAST_DTOR.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
275 |
+++ stdcxx-4.2.1/etc/config/src/BAD_CAST_DTOR.cpp 2011-04-26 13:52:55.955239832 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
276 |
@@ -1,4 +1,4 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
277 |
-// checking for bad_cast dtor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
278 |
+// checking for bad_cast default ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
279 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
280 |
/*************************************************************************** |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
281 |
* |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
282 |
@@ -28,13 +28,32 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
283 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
284 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
285 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
286 |
-#define TEST_DTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
287 |
+#if defined(__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
288 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
289 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
290 |
+#include <typeinfo> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
291 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
292 |
+int |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
293 |
+main(int argc, char* argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
294 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
295 |
+ std::bad_cast* bc0 = new std::bad_cast(); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
296 |
+ bc0->~bad_cast(); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
297 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
298 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
299 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
300 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
301 |
+#else |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
302 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
303 |
+#define TEST_DEFAULT_CTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
304 |
#define bad_alloc bad_cast |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
305 |
-#define main test_bad_cast_dtor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
306 |
+#define main test_bad_cast_default_ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
307 |
#include "BAD_ALLOC_ASSIGNMENT.cpp" |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
308 |
#undef main |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
309 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
310 |
int main (int argc, char *argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
311 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
312 |
- return test_bad_cast_dtor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
313 |
+ return test_bad_cast_default_ctor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
314 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
315 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
316 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
317 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
318 |
--- stdcxx-4.2.1/etc/config/src/BAD_CAST_WHAT.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
319 |
+++ stdcxx-4.2.1/etc/config/src/BAD_CAST_WHAT.cpp 2011-04-26 13:55:15.949597605 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
320 |
@@ -28,6 +28,22 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
321 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
322 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
323 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
324 |
+#if defined(__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
325 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
326 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
327 |
+#include <typeinfo> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
328 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
329 |
+int |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
330 |
+main(int argc, char* argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
331 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
332 |
+ std::bad_cast bc; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
333 |
+ const char* c = bc.what(); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
334 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
335 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
336 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
337 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
338 |
+#else // !__SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
339 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
340 |
#define TEST_WHAT |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
341 |
#define bad_alloc bad_cast |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
342 |
#define main test_bad_cast_what |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
343 |
@@ -38,3 +54,6 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
344 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
345 |
return test_bad_cast_what (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
346 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
347 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
348 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
349 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
350 |
--- stdcxx-4.2.1/etc/config/src/BAD_EXCEPTION_ASSIGNMENT.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
351 |
+++ stdcxx-4.2.1/etc/config/src/BAD_EXCEPTION_ASSIGNMENT.cpp 2011-04-26 14:03:47.469339894 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
352 |
@@ -28,6 +28,25 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
353 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
354 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
355 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
356 |
+#if defined(__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
357 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
358 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
359 |
+#include <typeinfo> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
360 |
+#include <exception> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
361 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
362 |
+int |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
363 |
+main(int argc, char* argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
364 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
365 |
+ std::bad_exception be0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
366 |
+ std::bad_exception be1; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
367 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
368 |
+ be1 = be0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
369 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
370 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
371 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
372 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
373 |
+#else // !__SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
374 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
375 |
#define TEST_ASSIGNMENT |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
376 |
#define bad_alloc bad_exception |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
377 |
#define main test_bad_exception_assignment |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
378 |
@@ -38,3 +57,6 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
379 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
380 |
return test_bad_exception_assignment (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
381 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
382 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
383 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
384 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
385 |
--- stdcxx-4.2.1/etc/config/src/BAD_EXCEPTION_COPY_CTOR.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
386 |
+++ stdcxx-4.2.1/etc/config/src/BAD_EXCEPTION_COPY_CTOR.cpp 2011-04-26 14:05:23.218099844 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
387 |
@@ -28,6 +28,23 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
388 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
389 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
390 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
391 |
+#if defined (__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
392 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
393 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
394 |
+#include <typeinfo> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
395 |
+#include <exception> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
396 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
397 |
+int |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
398 |
+main(int argc, char* argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
399 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
400 |
+ std::bad_exception be0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
401 |
+ std::bad_exception be1 (be0); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
402 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
403 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
404 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
405 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
406 |
+#else // !__SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
407 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
408 |
#define TEST_COPY_CTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
409 |
#define bad_alloc bad_exception |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
410 |
#define main test_bad_exception_copy_ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
411 |
@@ -38,3 +55,6 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
412 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
413 |
return test_bad_exception_copy_ctor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
414 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
415 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
416 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
417 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
418 |
--- stdcxx-4.2.1/etc/config/src/BAD_EXCEPTION_DEFAULT_CTOR.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
419 |
+++ stdcxx-4.2.1/etc/config/src/BAD_EXCEPTION_DEFAULT_CTOR.cpp 2011-04-26 14:08:34.147321554 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
420 |
@@ -1,4 +1,4 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
421 |
-// checking for bad_exception default ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
422 |
+// checking for bad_exception copy ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
423 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
424 |
/*************************************************************************** |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
425 |
* |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
426 |
@@ -28,13 +28,32 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
427 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
428 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
429 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
430 |
-#define TEST_DEFAULT_CTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
431 |
+#if defined (__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
432 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
433 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
434 |
+#include <typeinfo> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
435 |
+#include <exception> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
436 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
437 |
+int |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
438 |
+main(int argc, char* argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
439 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
440 |
+ std::bad_exception be; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
441 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
442 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
443 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
444 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
445 |
+#else // !__SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
446 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
447 |
+#define TEST_COPY_CTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
448 |
#define bad_alloc bad_exception |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
449 |
-#define main test_bad_exception_default_ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
450 |
+#define main test_bad_exception_copy_ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
451 |
#include "BAD_ALLOC_ASSIGNMENT.cpp" |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
452 |
#undef main |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
453 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
454 |
int main (int argc, char *argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
455 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
456 |
- return test_bad_exception_default_ctor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
457 |
+ return test_bad_exception_copy_ctor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
458 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
459 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
460 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
461 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
462 |
--- stdcxx-4.2.1/etc/config/src/BAD_EXCEPTION_DTOR.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
463 |
+++ stdcxx-4.2.1/etc/config/src/BAD_EXCEPTION_DTOR.cpp 2011-04-26 14:07:02.939331771 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
464 |
@@ -1,4 +1,4 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
465 |
-// checking for bad_exception dtor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
466 |
+// checking for bad_exception copy ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
467 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
468 |
/*************************************************************************** |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
469 |
* |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
470 |
@@ -28,13 +28,33 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
471 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
472 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
473 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
474 |
-#define TEST_DTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
475 |
+#if defined (__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
476 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
477 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
478 |
+#include <typeinfo> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
479 |
+#include <exception> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
480 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
481 |
+int |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
482 |
+main(int argc, char* argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
483 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
484 |
+ std::bad_exception* be = new std::bad_exception(); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
485 |
+ be->~bad_exception(); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
486 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
487 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
488 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
489 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
490 |
+#else // !__SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
491 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
492 |
+#define TEST_COPY_CTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
493 |
#define bad_alloc bad_exception |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
494 |
-#define main test_bad_exception_dtor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
495 |
+#define main test_bad_exception_copy_ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
496 |
#include "BAD_ALLOC_ASSIGNMENT.cpp" |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
497 |
#undef main |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
498 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
499 |
int main (int argc, char *argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
500 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
501 |
- return test_bad_exception_dtor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
502 |
+ return test_bad_exception_copy_ctor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
503 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
504 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
505 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
506 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
507 |
--- stdcxx-4.2.1/etc/config/src/BAD_EXCEPTION_WHAT.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
508 |
+++ stdcxx-4.2.1/etc/config/src/BAD_EXCEPTION_WHAT.cpp 2011-04-26 14:08:24.468194595 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
509 |
@@ -1,4 +1,4 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
510 |
-// checking for bad_exception::what() |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
511 |
+// checking for bad_exception copy ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
512 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
513 |
/*************************************************************************** |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
514 |
* |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
515 |
@@ -28,13 +28,33 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
516 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
517 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
518 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
519 |
-#define TEST_WHAT |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
520 |
+#if defined (__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
521 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
522 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
523 |
+#include <typeinfo> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
524 |
+#include <exception> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
525 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
526 |
+int |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
527 |
+main(int argc, char* argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
528 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
529 |
+ std::bad_exception be; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
530 |
+ const char* c = be.what(); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
531 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
532 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
533 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
534 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
535 |
+#else // !__SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
536 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
537 |
+#define TEST_COPY_CTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
538 |
#define bad_alloc bad_exception |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
539 |
-#define main test_bad_exception_what |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
540 |
+#define main test_bad_exception_copy_ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
541 |
#include "BAD_ALLOC_ASSIGNMENT.cpp" |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
542 |
#undef main |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
543 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
544 |
int main (int argc, char *argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
545 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
546 |
- return test_bad_exception_what (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
547 |
+ return test_bad_exception_copy_ctor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
548 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
549 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
550 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
551 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
552 |
--- stdcxx-4.2.1/etc/config/src/BAD_TYPEID_ASSIGNMENT.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
553 |
+++ stdcxx-4.2.1/etc/config/src/BAD_TYPEID_ASSIGNMENT.cpp 2011-04-26 13:56:48.373631557 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
554 |
@@ -28,6 +28,24 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
555 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
556 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
557 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
558 |
+#if defined(__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
559 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
560 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
561 |
+#include <typeinfo> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
562 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
563 |
+int |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
564 |
+main(int argc, char* argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
565 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
566 |
+ std::bad_typeid bti0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
567 |
+ std::bad_typeid bti1; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
568 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
569 |
+ bti1 = bti0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
570 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
571 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
572 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
573 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
574 |
+#else // !__SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
575 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
576 |
#define TEST_ASSIGNMENT |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
577 |
#define bad_alloc bad_typeid |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
578 |
#define main test_bad_typeid_assignment |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
579 |
@@ -38,3 +56,6 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
580 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
581 |
return test_bad_typeid_assignment (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
582 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
583 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
584 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
585 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
586 |
--- stdcxx-4.2.1/etc/config/src/BAD_TYPEID_COPY_CTOR.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
587 |
+++ stdcxx-4.2.1/etc/config/src/BAD_TYPEID_COPY_CTOR.cpp 2011-04-26 13:58:09.815296500 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
588 |
@@ -28,6 +28,22 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
589 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
590 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
591 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
592 |
+#if defined(__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
593 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
594 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
595 |
+#include <typeinfo> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
596 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
597 |
+int |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
598 |
+main(int argc, char* argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
599 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
600 |
+ std::bad_typeid bti0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
601 |
+ std::bad_typeid bti1 (bti0); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
602 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
603 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
604 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
605 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
606 |
+#else // !__SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
607 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
608 |
#define TEST_COPY_CTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
609 |
#define bad_alloc bad_typeid |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
610 |
#define main test_bad_typeid_copy_ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
611 |
@@ -38,3 +54,6 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
612 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
613 |
return test_bad_typeid_copy_ctor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
614 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
615 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
616 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
617 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
618 |
--- stdcxx-4.2.1/etc/config/src/BAD_TYPEID_DEFAULT_CTOR.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
619 |
+++ stdcxx-4.2.1/etc/config/src/BAD_TYPEID_DEFAULT_CTOR.cpp 2011-04-26 13:59:30.736288536 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
620 |
@@ -28,6 +28,21 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
621 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
622 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
623 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
624 |
+#if defined(__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
625 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
626 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
627 |
+#include <typeinfo> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
628 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
629 |
+int |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
630 |
+main(int argc, char* argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
631 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
632 |
+ std::bad_typeid bti0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
633 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
634 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
635 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
636 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
637 |
+#else // !__SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
638 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
639 |
#define TEST_DEFAULT_CTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
640 |
#define bad_alloc bad_typeid |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
641 |
#define main test_bad_typeid_default_ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
642 |
@@ -38,3 +53,6 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
643 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
644 |
return test_bad_typeid_default_ctor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
645 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
646 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
647 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
648 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
649 |
--- stdcxx-4.2.1/etc/config/src/BAD_TYPEID_DTOR.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
650 |
+++ stdcxx-4.2.1/etc/config/src/BAD_TYPEID_DTOR.cpp 2011-04-26 14:00:32.735809384 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
651 |
@@ -1,4 +1,4 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
652 |
-// checking for bad_typeid dtor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
653 |
+// checking for bad_typeid default ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
654 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
655 |
/*************************************************************************** |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
656 |
* |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
657 |
@@ -28,13 +28,32 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
658 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
659 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
660 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
661 |
-#define TEST_DTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
662 |
+#if defined(__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
663 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
664 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
665 |
+#include <typeinfo> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
666 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
667 |
+int |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
668 |
+main(int argc, char* argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
669 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
670 |
+ std::bad_typeid* bti0 = new std::bad_typeid(); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
671 |
+ bti0->~bad_typeid(); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
672 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
673 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
674 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
675 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
676 |
+#else // !__SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
677 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
678 |
+#define TEST_DEFAULT_CTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
679 |
#define bad_alloc bad_typeid |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
680 |
-#define main test_bad_typeid_dtor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
681 |
+#define main test_bad_typeid_default_ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
682 |
#include "BAD_ALLOC_ASSIGNMENT.cpp" |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
683 |
#undef main |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
684 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
685 |
int main (int argc, char *argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
686 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
687 |
- return test_bad_typeid_dtor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
688 |
+ return test_bad_typeid_default_ctor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
689 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
690 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
691 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
692 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
693 |
--- stdcxx-4.2.1/etc/config/src/BAD_TYPEID_WHAT.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
694 |
+++ stdcxx-4.2.1/etc/config/src/BAD_TYPEID_WHAT.cpp 2011-04-26 14:01:21.301137727 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
695 |
@@ -1,4 +1,4 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
696 |
-// checking for bad_typeid::what() |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
697 |
+// checking for bad_typeid default ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
698 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
699 |
/*************************************************************************** |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
700 |
* |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
701 |
@@ -28,13 +28,32 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
702 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
703 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
704 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
705 |
-#define TEST_WHAT |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
706 |
+#if defined(__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
707 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
708 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
709 |
+#include <typeinfo> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
710 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
711 |
+int |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
712 |
+main(int argc, char* argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
713 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
714 |
+ std::bad_typeid bti0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
715 |
+ const char* c = bti0.what(); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
716 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
717 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
718 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
719 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
720 |
+#else // !__SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
721 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
722 |
+#define TEST_DEFAULT_CTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
723 |
#define bad_alloc bad_typeid |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
724 |
-#define main test_bad_typeid_what |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
725 |
+#define main test_bad_typeid_default_ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
726 |
#include "BAD_ALLOC_ASSIGNMENT.cpp" |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
727 |
#undef main |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
728 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
729 |
int main (int argc, char *argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
730 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
731 |
- return test_bad_typeid_what (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
732 |
+ return test_bad_typeid_default_ctor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
733 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
734 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
735 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
736 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
737 |
--- stdcxx-4.2.1/etc/config/src/EXCEPTION_ASSIGNMENT.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
738 |
+++ stdcxx-4.2.1/etc/config/src/EXCEPTION_ASSIGNMENT.cpp 2011-04-26 14:18:44.217140388 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
739 |
@@ -1,4 +1,4 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
740 |
-// checking for exception assignment operator |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
741 |
+// checking for bad_exception assignment operator |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
742 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
743 |
/*************************************************************************** |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
744 |
* |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
745 |
@@ -28,13 +28,35 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
746 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
747 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
748 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
749 |
+#if defined(__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
750 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
751 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
752 |
+#include <typeinfo> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
753 |
+#include <exception> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
754 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
755 |
+int |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
756 |
+main(int argc, char* argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
757 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
758 |
+ std::exception e0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
759 |
+ std::exception e1; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
760 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
761 |
+ e1 = e0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
762 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
763 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
764 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
765 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
766 |
+#else // !__SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
767 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
768 |
#define TEST_ASSIGNMENT |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
769 |
-#define bad_alloc exception |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
770 |
-#define main test_exception_assignment |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
771 |
+#define bad_alloc bad_exception |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
772 |
+#define main test_bad_exception_assignment |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
773 |
#include "BAD_ALLOC_ASSIGNMENT.cpp" |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
774 |
#undef main |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
775 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
776 |
int main (int argc, char *argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
777 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
778 |
- return test_exception_assignment (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
779 |
+ return test_bad_exception_assignment (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
780 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
781 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
782 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
783 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
784 |
--- stdcxx-4.2.1/etc/config/src/EXCEPTION_COPY_CTOR.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
785 |
+++ stdcxx-4.2.1/etc/config/src/EXCEPTION_COPY_CTOR.cpp 2011-04-26 14:19:21.672904649 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
786 |
@@ -1,4 +1,4 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
787 |
-// checking for exception copy ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
788 |
+// checking for bad_exception copy ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
789 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
790 |
/*************************************************************************** |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
791 |
* |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
792 |
@@ -28,13 +28,33 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
793 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
794 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
795 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
796 |
+#if defined (__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
797 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
798 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
799 |
+#include <typeinfo> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
800 |
+#include <exception> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
801 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
802 |
+int |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
803 |
+main(int argc, char* argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
804 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
805 |
+ std::exception e0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
806 |
+ std::exception e1 (e0); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
807 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
808 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
809 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
810 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
811 |
+#else // !__SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
812 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
813 |
#define TEST_COPY_CTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
814 |
-#define bad_alloc exception |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
815 |
-#define main test_exception_copy_ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
816 |
+#define bad_alloc bad_exception |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
817 |
+#define main test_bad_exception_copy_ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
818 |
#include "BAD_ALLOC_ASSIGNMENT.cpp" |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
819 |
#undef main |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
820 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
821 |
int main (int argc, char *argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
822 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
823 |
- return test_exception_copy_ctor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
824 |
+ return test_bad_exception_copy_ctor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
825 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
826 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
827 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
828 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
829 |
--- stdcxx-4.2.1/etc/config/src/EXCEPTION_DEFAULT_CTOR.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
830 |
+++ stdcxx-4.2.1/etc/config/src/EXCEPTION_DEFAULT_CTOR.cpp 2011-04-26 14:20:19.404241323 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
831 |
@@ -1,4 +1,4 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
832 |
-// checking for exception default ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
833 |
+// checking for bad_exception copy ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
834 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
835 |
/*************************************************************************** |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
836 |
* |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
837 |
@@ -28,13 +28,32 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
838 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
839 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
840 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
841 |
-#define TEST_DEFAULT_CTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
842 |
-#define bad_alloc exception |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
843 |
-#define main test_exception_default_ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
844 |
+#if defined (__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
845 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
846 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
847 |
+#include <typeinfo> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
848 |
+#include <exception> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
849 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
850 |
+int |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
851 |
+main(int argc, char* argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
852 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
853 |
+ std::exception e; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
854 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
855 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
856 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
857 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
858 |
+#else // !__SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
859 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
860 |
+#define TEST_COPY_CTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
861 |
+#define bad_alloc bad_exception |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
862 |
+#define main test_bad_exception_copy_ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
863 |
#include "BAD_ALLOC_ASSIGNMENT.cpp" |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
864 |
#undef main |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
865 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
866 |
int main (int argc, char *argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
867 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
868 |
- return test_exception_default_ctor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
869 |
+ return test_bad_exception_copy_ctor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
870 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
871 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
872 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
873 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
874 |
--- stdcxx-4.2.1/etc/config/src/EXCEPTION_DTOR.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
875 |
+++ stdcxx-4.2.1/etc/config/src/EXCEPTION_DTOR.cpp 2011-04-26 14:21:04.960910465 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
876 |
@@ -1,4 +1,4 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
877 |
-// checking for exception dtor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
878 |
+// checking for bad_exception copy ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
879 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
880 |
/*************************************************************************** |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
881 |
* |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
882 |
@@ -28,13 +28,33 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
883 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
884 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
885 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
886 |
-#define TEST_DTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
887 |
-#define bad_alloc exception |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
888 |
-#define main test_exception_dtor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
889 |
+#if defined (__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
890 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
891 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
892 |
+#include <typeinfo> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
893 |
+#include <exception> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
894 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
895 |
+int |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
896 |
+main(int argc, char* argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
897 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
898 |
+ std::exception* e = new std::exception(); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
899 |
+ e->~exception(); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
900 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
901 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
902 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
903 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
904 |
+#else // !__SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
905 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
906 |
+#define TEST_COPY_CTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
907 |
+#define bad_alloc bad_exception |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
908 |
+#define main test_bad_exception_copy_ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
909 |
#include "BAD_ALLOC_ASSIGNMENT.cpp" |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
910 |
#undef main |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
911 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
912 |
int main (int argc, char *argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
913 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
914 |
- return test_exception_dtor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
915 |
+ return test_bad_exception_copy_ctor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
916 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
917 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
918 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
919 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
920 |
--- stdcxx-4.2.1/etc/config/src/EXCEPTION_WHAT.cpp 2008-04-24 17:25:44.000000000 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
921 |
+++ stdcxx-4.2.1/etc/config/src/EXCEPTION_WHAT.cpp 2011-04-26 14:21:45.873861528 -0700 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
922 |
@@ -1,4 +1,4 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
923 |
-// checking for exception::what() |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
924 |
+// checking for bad_exception copy ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
925 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
926 |
/*************************************************************************** |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
927 |
* |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
928 |
@@ -28,13 +28,33 @@ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
929 |
# endif // _RWSTD_NO_RUNTIME_IN_STD |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
930 |
#endif // 0 |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
931 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
932 |
-#define TEST_WHAT |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
933 |
-#define bad_alloc exception |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
934 |
-#define main test_exception_what |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
935 |
+#if defined (__SUNPRO_CC) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
936 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
937 |
+#include <new> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
938 |
+#include <typeinfo> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
939 |
+#include <exception> |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
940 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
941 |
+int |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
942 |
+main(int argc, char* argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
943 |
+{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
944 |
+ std::exception e; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
945 |
+ const char* c = e.what(); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
946 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
947 |
+ return 0; |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
948 |
+} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
949 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
950 |
+#else // !__SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
951 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
952 |
+#define TEST_COPY_CTOR |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
953 |
+#define bad_alloc bad_exception |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
954 |
+#define main test_bad_exception_copy_ctor |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
955 |
#include "BAD_ALLOC_ASSIGNMENT.cpp" |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
956 |
#undef main |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
957 |
|
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
958 |
int main (int argc, char *argv[]) |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
959 |
{ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
960 |
- return test_exception_what (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
961 |
+ return test_bad_exception_copy_ctor (argc, argv); |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
962 |
} |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
963 |
+ |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
964 |
+#endif // __SUNPRO_CC |
94ae4d75524c
7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
965 |
+ |