decl.c (get_atexit_fn_ptr_type): New function.
authorMark Mitchell <mark@codesourcery.com>
Fri, 1 Jun 2007 00:44:36 +0000 (00:44 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Fri, 1 Jun 2007 00:44:36 +0000 (00:44 +0000)
commit46a9e5217844297332b2e5e0c568d4448f365e96
tree420cff63564965826ce919df9219fa10d126d563
parentfa2185f0c8be353357878e67a0bb610ab7a9a704
decl.c (get_atexit_fn_ptr_type): New function.

* decl.c (get_atexit_fn_ptr_type): New function.
(get_atexit_node): Use it.
(start_cleanup_fn): Likewise.
(register_dtor_fn): Use the object's destructor, instead of a
separate cleanup function, where possible.
* cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
(atexit_fn_ptr_type_node): New macro.
* decl2.c (build_cleanup): Use build_address.
* g++.dg/init/cleanup3.C: New test.

From-SVN: r125253
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/init/cleanup3.C [new file with mode: 0644]