aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/delete2.C
blob: f2bacde1185ebfc28cd5e4ff6d7c936f45b64a16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// GROUPS passed operator-delete
// Check that using the delete operator with a null pointer
// is allowed (as called for by The Book, pg. 259)

extern "C" void printf (char *, ...); 

struct base {
	int member;
};

base* bp;

void test ()
{
	delete bp;
}

int main ()
{
	bp = (base *) 0;
	test ();

	printf ("PASS\n");
	return 0;
}