summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl2.c2
-rw-r--r--gcc/cp/semantics.c4
3 files changed, 11 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index a9f4d254c47..2bf12bd9230 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2007-02-26 Mark Mitchell <mark@codesourcery.com>
+
+ * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
+ * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
+
2007-02-25 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (static_ctors): Remove.
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 1feb3a7661f..a1664b81bcd 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -3289,6 +3289,8 @@ cp_write_global_declarations (void)
if (priority_info_map)
splay_tree_delete (priority_info_map);
+ c_build_cdtor_fns ();
+
/* Generate any missing aliases. */
maybe_apply_pending_pragma_weaks ();
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 71c16e07e11..6ffc9650fd2 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -3159,6 +3159,10 @@ expand_or_defer_fn (tree fn)
return;
}
+ /* Keep track of functions declared with the "constructor" and
+ "destructor" attribute. */
+ c_record_cdtor_fn (fn);
+
/* We make a decision about linkage for these functions at the end
of the compilation. Until that point, we do not want the back
end to output them -- but we do want it to see the bodies of