From: Brendan Kehoe Date: Thu, 23 Oct 1997 00:00:20 +0000 (+0000) Subject: method.c (build_template_parm_names, [...]): Add static to definitions. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4966381af5a597dd1cf0f4f73b70d12f5d17be13;p=platform%2Fupstream%2Fgcc.git method.c (build_template_parm_names, [...]): Add static to definitions. * method.c (build_template_parm_names, build_decl_overload_real): Add static to definitions. * pt.c (add_to_template_args, note_template_header, processing_explicit_specialization, type_unification_real): Likewise. ({determine,check}_explicit_specialization): Use a single string for error messages. fixes problems building with sunos4 system cc From-SVN: r16150 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 30c8a40..ca3ef80 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,12 @@ +1997-10-22 Brendan Kehoe + + * method.c (build_template_parm_names, build_decl_overload_real): + Add static to definitions. + * pt.c (add_to_template_args, note_template_header, + processing_explicit_specialization, type_unification_real): Likewise. + ({determine,check}_explicit_specialization): Use a single string for + error messages. + Mon Oct 20 12:06:34 1997 Jason Merrill * except.c (expand_exception_blocks): Call do_pending_stack_adust. diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 15f444b..3b7dbc8 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -656,7 +656,7 @@ build_overload_value (type, value, in_template) /* Add encodings for the vector of template parameters in PARMLIST, given the vector of arguments to be substituted in ARGLIST. */ -void +static void build_template_parm_names (parmlist, arglist) tree parmlist; tree arglist; @@ -1104,7 +1104,7 @@ build_static_name (context, name) return get_identifier ((char *)obstack_base (&scratch_obstack)); } -tree +static tree build_decl_overload_real (dname, parms, ret_type, tparms, targs, for_method) tree dname; diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 304d489..e960f13 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -214,7 +214,7 @@ is_member_template (t) /* Return a new template argument vector which contains all of ARGS, but has as its innermost set of arguments the EXTRA_ARGS. */ -tree +static tree add_to_template_args (args, extra_args) tree args; tree extra_args; @@ -288,7 +288,7 @@ reset_specialization () /* We've just seen a template header. If SPECIALIZATION is non-zero, it was of the form template <>. */ -void +static void note_template_header (specialization) int specialization; { @@ -301,8 +301,8 @@ note_template_header (specialization) types that appeared was TEMPLATE_COUNT, is an explicit specialization. */ -int -processing_explicit_specialization(template_count) +static int +processing_explicit_specialization (template_count) int template_count; { /* A function declaration is an explicit specialization of a member @@ -424,8 +424,8 @@ determine_explicit_specialization (template_id, type, targs_out, if (matching_fns == NULL_TREE) { if (complain) - cp_error ("Specialization of `%s' does not match any template " - "declaration.", IDENTIFIER_POINTER (name)); + cp_error ("Specialization of `%s' does not match any template declaration.", + IDENTIFIER_POINTER (name)); *targs_out = NULL_TREE; return NULL_TREE; } @@ -501,8 +501,7 @@ check_explicit_specialization (declarator, decl, template_count, flags) an explicit instantiation. */ return 2; else if (pedantic) - pedwarn ("Explicit specialization not preceeded by " - "`template <>'"); + pedwarn ("Explicit specialization not preceeded by `template <>'"); } if (TREE_CODE (declarator) != TEMPLATE_ID_EXPR) @@ -3564,7 +3563,7 @@ type_unification (tparms, targs, parms, args, targs_in, nsubsts, } -int +static int type_unification_real (tparms, targs, parms, args, nsubsts, subr, strict, allow_incomplete) tree tparms, *targs, parms, args;