Commit 4966381a by Brendan Kehoe Committed by Brendan Kehoe

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
parent a04232e5
1997-10-22 Brendan Kehoe <brendan@cygnus.com>
* 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 <jason@yorick.cygnus.com> Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
* except.c (expand_exception_blocks): Call do_pending_stack_adust. * except.c (expand_exception_blocks): Call do_pending_stack_adust.
......
...@@ -656,7 +656,7 @@ build_overload_value (type, value, in_template) ...@@ -656,7 +656,7 @@ build_overload_value (type, value, in_template)
/* Add encodings for the vector of template parameters in PARMLIST, /* Add encodings for the vector of template parameters in PARMLIST,
given the vector of arguments to be substituted in ARGLIST. */ given the vector of arguments to be substituted in ARGLIST. */
void static void
build_template_parm_names (parmlist, arglist) build_template_parm_names (parmlist, arglist)
tree parmlist; tree parmlist;
tree arglist; tree arglist;
...@@ -1104,7 +1104,7 @@ build_static_name (context, name) ...@@ -1104,7 +1104,7 @@ build_static_name (context, name)
return get_identifier ((char *)obstack_base (&scratch_obstack)); return get_identifier ((char *)obstack_base (&scratch_obstack));
} }
tree static tree
build_decl_overload_real (dname, parms, ret_type, tparms, targs, build_decl_overload_real (dname, parms, ret_type, tparms, targs,
for_method) for_method)
tree dname; tree dname;
......
...@@ -214,7 +214,7 @@ is_member_template (t) ...@@ -214,7 +214,7 @@ is_member_template (t)
/* Return a new template argument vector which contains all of ARGS, /* Return a new template argument vector which contains all of ARGS,
but has as its innermost set of arguments the EXTRA_ARGS. */ but has as its innermost set of arguments the EXTRA_ARGS. */
tree static tree
add_to_template_args (args, extra_args) add_to_template_args (args, extra_args)
tree args; tree args;
tree extra_args; tree extra_args;
...@@ -288,7 +288,7 @@ reset_specialization () ...@@ -288,7 +288,7 @@ reset_specialization ()
/* We've just seen a template header. If SPECIALIZATION is non-zero, /* We've just seen a template header. If SPECIALIZATION is non-zero,
it was of the form template <>. */ it was of the form template <>. */
void static void
note_template_header (specialization) note_template_header (specialization)
int specialization; int specialization;
{ {
...@@ -301,8 +301,8 @@ note_template_header (specialization) ...@@ -301,8 +301,8 @@ note_template_header (specialization)
types that appeared was TEMPLATE_COUNT, is an explicit types that appeared was TEMPLATE_COUNT, is an explicit
specialization. */ specialization. */
int static int
processing_explicit_specialization(template_count) processing_explicit_specialization (template_count)
int template_count; int template_count;
{ {
/* A function declaration is an explicit specialization of a member /* A function declaration is an explicit specialization of a member
...@@ -424,8 +424,8 @@ determine_explicit_specialization (template_id, type, targs_out, ...@@ -424,8 +424,8 @@ determine_explicit_specialization (template_id, type, targs_out,
if (matching_fns == NULL_TREE) if (matching_fns == NULL_TREE)
{ {
if (complain) if (complain)
cp_error ("Specialization of `%s' does not match any template " cp_error ("Specialization of `%s' does not match any template declaration.",
"declaration.", IDENTIFIER_POINTER (name)); IDENTIFIER_POINTER (name));
*targs_out = NULL_TREE; *targs_out = NULL_TREE;
return NULL_TREE; return NULL_TREE;
} }
...@@ -501,8 +501,7 @@ check_explicit_specialization (declarator, decl, template_count, flags) ...@@ -501,8 +501,7 @@ check_explicit_specialization (declarator, decl, template_count, flags)
an explicit instantiation. */ an explicit instantiation. */
return 2; return 2;
else if (pedantic) else if (pedantic)
pedwarn ("Explicit specialization not preceeded by " pedwarn ("Explicit specialization not preceeded by `template <>'");
"`template <>'");
} }
if (TREE_CODE (declarator) != TEMPLATE_ID_EXPR) if (TREE_CODE (declarator) != TEMPLATE_ID_EXPR)
...@@ -3564,7 +3563,7 @@ type_unification (tparms, targs, parms, args, targs_in, nsubsts, ...@@ -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, type_unification_real (tparms, targs, parms, args, nsubsts, subr,
strict, allow_incomplete) strict, allow_incomplete)
tree tparms, *targs, parms, args; tree tparms, *targs, parms, args;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment