OSDN Git Service

x
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 10 Aug 1998 13:55:04 +0000 (13:55 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 10 Aug 1998 13:55:04 +0000 (13:55 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@21655 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/g++.old-deja/g++.other/init6.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/new.C
gcc/testsuite/g++.old-deja/g++.other/new2.C
gcc/testsuite/g++.old-deja/g++.robertl/eb15.C
gcc/testsuite/g++.old-deja/g++.robertl/eb2.C

diff --git a/gcc/testsuite/g++.old-deja/g++.other/init6.C b/gcc/testsuite/g++.old-deja/g++.other/init6.C
new file mode 100644 (file)
index 0000000..a684ae1
--- /dev/null
@@ -0,0 +1,12 @@
+// Test for default-initialization of POD-structs in functional cast notation.
+
+struct foo { int a[10]; };
+
+int main()
+{
+  foo f = foo();
+  int r = 0;
+  for (int i = 0; i < 10; ++i)
+    r |= f.a[i];
+  return r;
+}
index 829db70..e283957 100644 (file)
@@ -1,6 +1,6 @@
 // Build don't link:
 
-typedef unsigned int size_t;
+typedef __SIZE_TYPE__ size_t;
 inline void *
 operator new(size_t alloc_sz, const char *fname, unsigned lineno)
 {
index 88cbe0a..9a6e051 100644 (file)
@@ -1,5 +1,5 @@
 //Build don't link:
-typedef unsigned int size_t;
+typedef __SIZE_TYPE__ size_t;
 void *operator new(size_t, unsigned int);
 
 struct X{
index ef15764..902d463 100644 (file)
@@ -1,12 +1,13 @@
 // Build don't link:
 #include<iostream.h>
+#include<stddef.h>
 
 struct A {
   A() {
     cerr<<"A constructing\n";
     throw 1;
   }
-  void *operator new(unsigned sz) {
+  void *operator new(size_t sz) {
     cerr<<"A allocated\n";
     return ::operator new(sz);
   }
index a4b8e20..b200021 100644 (file)
@@ -1,5 +1,5 @@
 // Build don't link: 
-typedef unsigned int size_t;
+typedef __SIZE_TYPE__ size_t;
 inline void *operator new(size_t, void *place) throw() { return place; }
 
 struct A