| 1 |
// { dg-do assemble } |
| 2 |
// GROUPS passed bad-errors |
| 3 |
// bad-error file |
| 4 |
// Date: Sun, 31 Jul 1994 11:37:43 +1000 (EST) |
| 5 |
// From: Rohan LENARD <[email protected]> |
| 6 |
// Subject: g++-2.6.0 gives wrong warning for placement syntax new |
| 7 |
// Message-Id: <[email protected]> |
| 8 |
|
| 9 |
|
| 10 |
#include <stddef.h> |
| 11 |
|
| 12 |
void * operator new(size_t, int *); |
| 13 |
void * operator new(size_t, void *); |
| 14 |
|
| 15 |
int *x = 0; |
| 16 |
int foo(){ |
| 17 |
new (x) int *; |
| 18 |
new (&x) int *; |
| 19 |
new (x) int *; // This is identical to line 8 !!! |
| 20 |
return 1; |
| 21 |
} |