URL
https://opencores.org/ocsvn/scarts/scarts/trunk
Subversion Repositories scarts
[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.brendan/] [delete2.C] - Rev 12
Compare with Previous | Blame | View Log
// { dg-do run }
// 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" int printf (const char *, ...);
struct base {
int member;
};
base* bp;
void test ()
{
delete bp;
}
int main ()
{
bp = (base *) 0;
test ();
printf ("PASS\n");
return 0;
}