summaryrefslogtreecommitdiff
path: root/gcc/cp/cp-lang.c
diff options
context:
space:
mode:
authoraustern <austern@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-18 18:50:05 +0000
committeraustern <austern@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-18 18:50:05 +0000
commit28db4d965ab6f20bb4d7eb9ab93f1a99bf68c868 (patch)
treef2d1ae8da2b00770c1682fd0408e81e6c1fb7257 /gcc/cp/cp-lang.c
parent05967fa212f9583d6b1b174685474479fe4ddc7c (diff)
downloadgcc-28db4d965ab6f20bb4d7eb9ab93f1a99bf68c868.tar.gz
* langhooks.h, langhooks-def.h: introduce new langhook,
final_write_globals, with write_global_declarations as default. * toplev.c: Move invocation of wrapup_global_declarations from compile_file to new function, write_global_declarations. Change compile_file to use final_write_globals hook. Change wrapup_global_declarations so writing to DECL_DEFER_OUTPUT is conditional. * cp/cp-lang.c: Change lang hooks so that final_write_globals does nothing for C++. * cp/decl.c (wrapup_globals_for_namespace): Remove special handling of global namespace. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63051 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-lang.c')
-rw-r--r--gcc/cp/cp-lang.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/cp-lang.c b/gcc/cp/cp-lang.c
index 6dc03082eae..3671027ebe6 100644
--- a/gcc/cp/cp-lang.c
+++ b/gcc/cp/cp-lang.c
@@ -92,6 +92,9 @@ static bool cp_var_mod_type_p (tree);
#define LANG_HOOKS_PRINT_ERROR_FUNCTION cxx_print_error_function
#undef LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL
#define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL cxx_warn_unused_global_decl
+#undef LANG_HOOKS_WRITE_GLOBALS
+#define LANG_HOOKS_WRITE_GLOBALS lhd_do_nothing
+
#undef LANG_HOOKS_FUNCTION_INIT
#define LANG_HOOKS_FUNCTION_INIT cxx_push_function_context