* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91134
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
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);
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);
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);
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 *);
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);
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 *,
/* 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);
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 *
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;
-}
/* 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);
/* Finish a scope. */
-tree
+static tree
do_poplevel (tree stmt_list)
{
tree block = NULL;
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. */