aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBen Elliston <bje@au.ibm.com>2004-11-24 04:09:27 +0000
committerBen Elliston <bje@gcc.gnu.org>2004-11-24 15:09:27 +1100
commitaf746697141397c71da91a4f52f2e3b9db005cec (patch)
treef402c5fea47ec7ddebaa9e4cae76711df49aa044 /gcc
parent0b167d51ed3c0f9dfa2cee5bde9d7fd5a6bdd04d (diff)
downloadgcc-af746697141397c71da91a4f52f2e3b9db005cec.zip
gcc-af746697141397c71da91a4f52f2e3b9db005cec.tar.gz
gcc-af746697141397c71da91a4f52f2e3b9db005cec.tar.bz2
cp-tree.h (context_as_string): Remove extern.
* cp-tree.h (context_as_string): Remove extern. * error.c (context_as_string): Remove. * cp-tree.h (cp_type_qual_from_rid): Remove extern. * lex.c (cp_type_qual_from_rid): Remove. * cp-tree.h (do_poplevel): Remove extern. (check_multiple_declarators): Likewise. * semantics.c (do_poplevel): Make static. (check_multiple_declarators): Remove. * cp-tree.h (check_final_overrider): Remove extern. * search.c (check_final_overrider): Make static. * cp-tree.h (build_artificial_parm): Remove extern. * decl2.c (build_artificial_parm): Make static. From-SVN: r91134
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog19
-rw-r--r--gcc/cp/cp-tree.h6
-rw-r--r--gcc/cp/decl2.c2
-rw-r--r--gcc/cp/error.c8
-rw-r--r--gcc/cp/lex.c17
-rw-r--r--gcc/cp/search.c2
-rw-r--r--gcc/cp/semantics.c27
7 files changed, 22 insertions, 59 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index bcb9d21..a8ed1ae 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,22 @@
+2004-11-23 Ben Elliston <bje@au.ibm.com>
+
+ * cp-tree.h (context_as_string): Remove extern.
+ * error.c (context_as_string): Remove.
+
+ * cp-tree.h (cp_type_qual_from_rid): Remove extern.
+ * lex.c (cp_type_qual_from_rid): Remove.
+
+ * cp-tree.h (do_poplevel): Remove extern.
+ (check_multiple_declarators): Likewise.
+ * semantics.c (do_poplevel): Make static.
+ (check_multiple_declarators): Remove.
+
+ * cp-tree.h (check_final_overrider): Remove extern.
+ * search.c (check_final_overrider): Make static.
+
+ * cp-tree.h (build_artificial_parm): Remove extern.
+ * decl2.c (build_artificial_parm): Make static.
+
2004-11-22 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/18354
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 2f2a226..40979fb 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -3831,7 +3831,6 @@ extern void check_default_args (tree);
extern void mark_used (tree);
extern void finish_static_data_member_decl (tree, tree, tree, int);
extern tree cp_build_parm_decl (tree, tree);
-extern tree build_artificial_parm (tree, tree);
extern tree get_guard (tree);
extern tree get_guard_cond (tree);
extern tree set_guard (tree);
@@ -3853,7 +3852,6 @@ extern void init_error (void);
extern const char *type_as_string (tree, int);
extern const char *decl_as_string (tree, int);
extern const char *expr_as_string (tree, int);
-extern const char *context_as_string (tree, int);
extern const char *lang_decl_name (tree, int);
extern const char *language_to_string (enum languages);
extern const char *class_key_or_enum_as_string (tree);
@@ -3923,7 +3921,6 @@ extern tree cxx_make_type (enum tree_code);
extern tree make_aggr_type (enum tree_code);
extern void yyerror (const char *);
extern void yyhook (int);
-extern int cp_type_qual_from_rid (tree);
extern bool cxx_init (void);
extern void cxx_finish (void);
@@ -4056,7 +4053,6 @@ extern tree binfo_for_vtable (tree);
extern tree binfo_from_vbase (tree);
extern tree binfo_for_vbase (tree, tree);
extern tree look_for_overrides_here (tree, tree);
-extern int check_final_overrider (tree, tree);
#define dfs_skip_bases ((tree)1)
extern tree dfs_walk_all (tree, tree (*) (tree, void *),
tree (*) (tree, void *), void *);
@@ -4080,7 +4076,6 @@ extern void pop_to_parent_deferring_access_checks (void);
extern void perform_deferred_access_checks (void);
extern void perform_or_defer_access_check (tree, tree);
extern void init_cp_semantics (void);
-extern tree do_poplevel (tree);
extern void add_decl_expr (tree);
extern tree finish_expr_stmt (tree);
extern tree begin_if_stmt (void);
@@ -4157,7 +4152,6 @@ extern void finish_template_decl (tree);
extern tree finish_template_type (tree, tree, int);
extern tree finish_base_specifier (tree, tree, bool);
extern void finish_member_declaration (tree);
-extern void check_multiple_declarators (void);
extern void qualified_name_lookup_error (tree, tree, tree);
extern tree finish_id_expression (tree, tree, tree,
cp_id_kind *, tree *,
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index d8987e2..3b97367 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -157,7 +157,7 @@ cp_build_parm_decl (tree name, tree type)
/* Returns a PARM_DECL for a parameter of the indicated TYPE, with the
indicated NAME. */
-tree
+static tree
build_artificial_parm (tree name, tree type)
{
tree parm = cp_build_parm_decl (name, type);
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 07fa6d9..2f14db6 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -1919,14 +1919,6 @@ decl_as_string (tree decl, int flags)
return pp_formatted_text (cxx_pp);
}
-const char *
-context_as_string (tree context, int flags)
-{
- reinit_cxx_pp ();
- dump_scope (context, flags);
- return pp_formatted_text (cxx_pp);
-}
-
/* Generate the three forms of printable names for cxx_printable_name. */
const char *
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index d9775d9..85d8813 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -796,20 +796,3 @@ make_aggr_type (enum tree_code code)
return t;
}
-
-/* Return the type-qualifier corresponding to the identifier given by
- RID. */
-
-int
-cp_type_qual_from_rid (tree rid)
-{
- if (rid == ridpointers[(int) RID_CONST])
- return TYPE_QUAL_CONST;
- else if (rid == ridpointers[(int) RID_VOLATILE])
- return TYPE_QUAL_VOLATILE;
- else if (rid == ridpointers[(int) RID_RESTRICT])
- return TYPE_QUAL_RESTRICT;
-
- gcc_unreachable ();
- return TYPE_UNQUALIFIED;
-}
diff --git a/gcc/cp/search.c b/gcc/cp/search.c
index cedf1da..8c26565 100644
--- a/gcc/cp/search.c
+++ b/gcc/cp/search.c
@@ -1774,7 +1774,7 @@ dfs_walk_once_accessible (tree binfo, bool friends_p,
/* Check that virtual overrider OVERRIDER is acceptable for base function
BASEFN. Issue diagnostic, and return zero, if unacceptable. */
-int
+static int
check_final_overrider (tree overrider, tree basefn)
{
tree over_type = TREE_TYPE (overrider);
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index a36a631..2cd78eb 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -401,7 +401,7 @@ anon_aggr_type_p (tree node)
/* Finish a scope. */
-tree
+static tree
do_poplevel (tree stmt_list)
{
tree block = NULL;
@@ -2294,31 +2294,6 @@ finish_base_specifier (tree base, tree access, bool virtual_p)
return result;
}
-/* Called when multiple declarators are processed. If that is not
- permitted in this context, an error is issued. */
-
-void
-check_multiple_declarators (void)
-{
- /* [temp]
-
- In a template-declaration, explicit specialization, or explicit
- instantiation the init-declarator-list in the declaration shall
- contain at most one declarator.
-
- We don't just use PROCESSING_TEMPLATE_DECL for the first
- condition since that would disallow the perfectly valid code,
- like `template <class T> struct S { int i, j; };'. */
- if (at_function_scope_p ())
- /* It's OK to write `template <class T> void f() { int i, j;}'. */
- return;
-
- if (PROCESSING_REAL_TEMPLATE_DECL_P ()
- || processing_explicit_instantiation
- || processing_specialization)
- error ("multiple declarators in template declaration");
-}
-
/* Issue a diagnostic that NAME cannot be found in SCOPE. DECL is
what we found when we tried to do the lookup. */