OSDN Git Service

* gcc.dg/20020201-1.c: Use cleanup-coverage_files.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.law / bad-error3.C
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 <rjl@iassf.easams.com.au>
6 // Subject: g++-2.6.0 gives wrong warning for placement syntax new
7 // Message-Id: <0iCk1b0000000z0VY0@iassf.easams.com.au>
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 }