8sa1-gcc/gcc/testsuite/g++.old-deja/g++.other/crash36.C
Nathan Sidwell 36791f1ef1 decl.c (grok_op_properties): Always use coerce_new_type and coerce_delete_type.
cp/ChangeLog
	* decl.c (grok_op_properties): Always use coerce_new_type and
	coerce_delete_type.
	* decl2.c (coerce_new_type): Use c_size_type_node. Preserve
	exception specification. Tidy up.
	(coerce_delete_type): Preserve exception specification. Tidy up.
testsuite/ChangeLog
	* g++.old-deja/g++.other/crash36.C: New test.

From-SVN: r37319
2000-11-08 14:03:32 +00:00

22 lines
1014 B
C

// Build don't link:
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 7 Nov 2000 <nathan@codesourcery.com>
// Bug 573. We ICE'd verifying operator new and operator delete conformed
// to the standard's expectation.
void *operator new (__SIZE_TYPE__); // ok
void operator new (__SIZE_TYPE__); // ERROR - must return void *
void *operator new (); // ERROR - must take size_t
void *operator new (char); // ERROR - must take size_t
void *operator new (__SIZE_TYPE__, ...) throw(); // ok
void operator delete (void *) throw (); // ok
int operator delete (void *) throw (); // ERROR - must return void
void operator delete () throw (); // ERROR - must take void *
void operator delete (int *) throw (); // ERROR - must take void *
void operator delete (void *, __SIZE_TYPE__) throw (); // ok
void operator delete (...) throw (); // ERROR - must take void *
void operator delete (void *, ...) throw (); // ok