aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorNeil Booth <neil@gcc.gnu.org>2001-01-09 10:54:01 +0000
committerNeil Booth <neil@gcc.gnu.org>2001-01-09 10:54:01 +0000
commit13c61421ff315b27bb41e6ac8ccacdebab9d8247 (patch)
tree5175214bd3273e1990f7d1c7e0d43f3853a1fc53 /gcc/cp
parentfb83deef1a1438c21b65535483a4726f31862b20 (diff)
downloadgcc-13c61421ff315b27bb41e6ac8ccacdebab9d8247.zip
gcc-13c61421ff315b27bb41e6ac8ccacdebab9d8247.tar.gz
gcc-13c61421ff315b27bb41e6ac8ccacdebab9d8247.tar.bz2
c-lang.c (lang_hooks): Update.
* c-lang.c (lang_hooks): Update. (lang_init): Rename c_init. (lang_finish): Remove. * toplev.c (compile_file): Use lang_hooks for lang_init () and lang_finish (). * toplev.h (lang_hooks): Add init () and finish (). * tree.h (lang_init, lang_finish): Remove. * cp/tree.h (lang_init, lang_finish): Remove. * cp/decl2.c (cxx_post_options, lang_hooks): Move to cp/lex.c. * cp/lex.c (cxx_init, cxx_finish, cxx_post_options, lang_hooks): New. (lang_init, lang_finish): Remove. * f/com.c (lang_init, lang_finish): Rename f_init, f_finish. (lang_hooks): Update. * java/lang.c (lang_init): Rename java_init. (lang_finish): Remove. (lang_hooks): Update. * objc/objc-act.c (lang_init): Rename objc_init. (lang_finish): Remove. (lang_hoooks): Update. From-SVN: r38828
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/cp-tree.h2
-rw-r--r--gcc/cp/decl2.c11
-rw-r--r--gcc/cp/lex.c23
3 files changed, 18 insertions, 18 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index e69a23a..e2309e9 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -4062,8 +4062,6 @@ extern tree make_pointer_declarator PARAMS ((tree, tree));
extern tree make_reference_declarator PARAMS ((tree, tree));
extern tree make_call_declarator PARAMS ((tree, tree, tree, tree));
extern void set_quals_and_spec PARAMS ((tree, tree, tree));
-extern void lang_init PARAMS ((void));
-extern void lang_finish PARAMS ((void));
extern void print_parse_statistics PARAMS ((void));
extern void do_pending_inlines PARAMS ((void));
extern void process_next_inline PARAMS ((struct unparsed_text *));
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index e07a749..8bdd43e 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -59,7 +59,6 @@ typedef struct priority_info_s {
int destructions_p;
} *priority_info;
-static void cxx_post_options PARAMS ((void));
static void mark_vtable_entries PARAMS ((tree));
static void grok_function_init PARAMS ((tree, tree));
static int finish_vtable_vardecl PARAMS ((tree *, void *));
@@ -544,16 +543,6 @@ static const char * const unsupported_options[] = {
"strict-prototype",
};
-/* Each front end provides its own. */
-struct lang_hooks lang_hooks = {cxx_post_options};
-
-/* Post-switch processing. */
-static void
-cxx_post_options ()
-{
- cpp_post_options (parse_in);
-}
-
/* Compare two option strings, pointed two by P1 and P2, for use with
bsearch. */
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index a203ac9..3203b4c 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -61,6 +61,9 @@ static void handle_pragma_vtable PARAMS ((cpp_reader *));
static void handle_pragma_unit PARAMS ((cpp_reader *));
static void handle_pragma_interface PARAMS ((cpp_reader *));
static void handle_pragma_implementation PARAMS ((cpp_reader *));
+static void cxx_init PARAMS ((void));
+static void cxx_finish PARAMS ((void));
+static void cxx_post_options PARAMS ((void));
#ifdef GATHER_STATISTICS
#ifdef REDUCE_LENGTH
@@ -240,7 +243,17 @@ static const char *cplus_tree_code_name[] = {
};
#undef DEFTREECODE
-/* toplev.c needs to call these. */
+/* Each front end provides its own hooks, for toplev.c. */
+struct lang_hooks lang_hooks = {cxx_init,
+ cxx_finish,
+ cxx_post_options};
+
+/* Post-switch processing. */
+static void
+cxx_post_options ()
+{
+ cpp_post_options (parse_in);
+}
void
lang_init_options ()
@@ -259,8 +272,8 @@ lang_init_options ()
set_message_prefixing_rule (DIAGNOSTICS_SHOW_PREFIX_ONCE);
}
-void
-lang_init ()
+static void
+cxx_init ()
{
c_common_lang_init ();
@@ -268,8 +281,8 @@ lang_init ()
init_repo (input_filename);
}
-void
-lang_finish ()
+static void
+cxx_finish ()
{
if (flag_gnu_xref) GNU_xref_end (errorcount+sorrycount);
}