--- /dev/null
+// 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;
+}
// 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)
{
//Build don't link:
-typedef unsigned int size_t;
+typedef __SIZE_TYPE__ size_t;
void *operator new(size_t, unsigned int);
struct X{
// 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);
}
// 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