aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2002-04-16 03:17:57 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2002-04-16 03:17:57 +0000
commit0f2680051d915c63fa287f9cbdcf666d62b836af (patch)
treee9e1b7ea6f5b5ab3fe03dc167e214f577106357a /gcc
parent861829ed08240e6a484475ee53b5eb24bde850bc (diff)
downloadgcc-0f2680051d915c63fa287f9cbdcf666d62b836af.zip
gcc-0f2680051d915c63fa287f9cbdcf666d62b836af.tar.gz
gcc-0f2680051d915c63fa287f9cbdcf666d62b836af.tar.bz2
decl.c (register_dtor_fn): Pass the address of dso_handle, not dso_handle itself, to __cxa_atexit.
* decl.c (register_dtor_fn): Pass the address of dso_handle, not dso_handle itself, to __cxa_atexit. From-SVN: r52354
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 2863b77..d19ea37 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2002-04-15 Mark Mitchell <mark@codesourcery.com>
+
+ * decl.c (register_dtor_fn): Pass the address of dso_handle, not
+ dso_handle itself, to __cxa_atexit.
+
2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
* error.c (cxx_print_error_function): Adjust call to macros.
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 721cd63..04c9799 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -8608,7 +8608,9 @@ register_dtor_fn (decl)
cleanup = build_unary_op (ADDR_EXPR, cleanup, 0);
if (flag_use_cxa_atexit)
{
- args = tree_cons (NULL_TREE, get_dso_handle_node (), NULL_TREE);
+ args = tree_cons (NULL_TREE,
+ build_unary_op (ADDR_EXPR, get_dso_handle_node (), 0),
+ NULL_TREE);
args = tree_cons (NULL_TREE, null_pointer_node, args);
args = tree_cons (NULL_TREE, cleanup, args);
}