Fix warnings occured during profiledboostrap on
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / warning5.C
blob006713c03358d9fd79afb2c0539b602ca1b94bc3
1 // { dg-do run  }
2 // { dg-options "-Wall" }
3 // PRMS Id: 5135
4 // Bug: g++ complains that the result of the new expression is not used.
6 extern "C" int printf (const char *, ...);
7 inline void * operator new (__SIZE_TYPE__, void *p) { return p; }
9 class foo {
10 public:
11   foo() : a(42) {};
12   int a;
15 int
16 main()
18   char buffer[1024];
20   new (buffer) foo;
22   foo* pY = (foo *)buffer;
24   return pY->a != 42;