This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

(C++) patch to add static for SunOS 4 cc


1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>

	* class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
	cc happy.

Index: class.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/class.c,v
retrieving revision 1.133
diff -c -p -r1.133 class.c
*** class.c	1999/02/26 23:36:46	1.133
--- class.c	1999/03/03 19:22:13
*************** alter_access (t, binfo, fdecl, access)
*** 1450,1456 ****
  /* Process the USING_DECL, which is a member of T.  The METHOD_VEC, if
     non-NULL, is the methods of T.  The FIELDS are the fields of T.  */
  
! void
  handle_using_decl (using_decl, t, method_vec, fields)
       tree using_decl;
       tree t;
--- 1450,1456 ----
  /* Process the USING_DECL, which is a member of T.  The METHOD_VEC, if
     non-NULL, is the methods of T.  The FIELDS are the fields of T.  */
  
! static void
  handle_using_decl (using_decl, t, method_vec, fields)
       tree using_decl;
       tree t;
Index: decl2.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/decl2.c,v
retrieving revision 1.187
diff -c -p -r1.187 decl2.c
*** decl2.c	1999/02/26 23:36:55	1.187
--- decl2.c	1999/03/03 19:22:13
*************** get_temp_regvar (type, init)
*** 2067,2073 ****
     returns a VAR_DECL whose size is the same as the size of the
     ANON_DECL, if one is available.  */
  
! tree 
  build_anon_union_vars (anon_decl, elems, static_p, external_p)
       tree anon_decl;
       tree* elems;
--- 2067,2073 ----
     returns a VAR_DECL whose size is the same as the size of the
     ANON_DECL, if one is available.  */
  
! static tree 
  build_anon_union_vars (anon_decl, elems, static_p, external_p)
       tree anon_decl;
       tree* elems;
Index: method.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/method.c,v
retrieving revision 1.90
diff -c -p -r1.90 method.c
*** method.c	1999/02/26 23:36:58	1.90
--- method.c	1999/03/03 19:22:14
*************** flush_repeats (nrepeats, type)
*** 326,332 ****
  /* Returns nonzero iff this is a type to which we will want to make
     back-references (using the `B' code).  */
  
! int
  is_back_referenceable_type (type)
       tree type;
  {
--- 326,332 ----
  /* Returns nonzero iff this is a type to which we will want to make
     back-references (using the `B' code).  */
  
! static int
  is_back_referenceable_type (type)
       tree type;
  {
*************** build_qualified_name (decl)
*** 1040,1046 ****
     non-zero, mangled names for structure/union types are intentionally
     mangled differently from the method described in the ARM.  */
  
! void 
  build_mangled_name_for_type_with_Gcode (type, extra_Gcode)
       tree type;
       int extra_Gcode;
--- 1040,1046 ----
     non-zero, mangled names for structure/union types are intentionally
     mangled differently from the method described in the ARM.  */
  
! static void 
  build_mangled_name_for_type_with_Gcode (type, extra_Gcode)
       tree type;
       int extra_Gcode;
*************** build_mangled_name_for_type_with_Gcode (
*** 1055,1061 ****
  /* Like build_mangled_name_for_type_with_Gcode, but never outputs the
     `G'.  */
  
! void
  build_mangled_name_for_type (type)
       tree type;
  {
--- 1055,1061 ----
  /* Like build_mangled_name_for_type_with_Gcode, but never outputs the
     `G'.  */
  
! static void
  build_mangled_name_for_type (type)
       tree type;
  {
*************** build_mangled_name (parmtypes, begin, en
*** 1203,1209 ****
  
  /* Emit modifiers such as constant, read-only, and volatile.  */
  
! void 
  process_modifiers (parmtype) 
       tree parmtype;
  {
--- 1203,1209 ----
  
  /* Emit modifiers such as constant, read-only, and volatile.  */
  
! static void 
  process_modifiers (parmtype) 
       tree parmtype;
  {
*************** process_modifiers (parmtype) 
*** 1231,1237 ****
     so, return 1 and emit a backreference to TYPE.  Otherwise, add TYPE
     to the list of back-referenceable types and return 0.  */
  
! int 
  check_btype (type) 
       tree type;
  {
--- 1231,1237 ----
     so, return 1 and emit a backreference to TYPE.  Otherwise, add TYPE
     to the list of back-referenceable types and return 0.  */
  
! static int 
  check_btype (type) 
       tree type;
  {
Index: pt.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/pt.c,v
retrieving revision 1.267
diff -c -p -r1.267 pt.c
*** pt.c	1999/03/02 23:44:49	1.267
--- pt.c	1999/03/03 19:22:14
*************** finish_member_template_decl (decl)
*** 273,279 ****
     that, for example, `template_class_depth (current_class_type)' is
     always safe.  */
  
! int 
  template_class_depth_real (type, count_specializations)
       tree type;
       int count_specializations;
--- 273,279 ----
     that, for example, `template_class_depth (current_class_type)' is
     always safe.  */
  
! static int 
  template_class_depth_real (type, count_specializations)
       tree type;
       int count_specializations;
*************** begin_template_parm_list ()
*** 587,593 ****
  /* This routine is called when a specialization is declared.  If it is
     illegal to declare a specialization here, an error is reported.  */
  
! void
  check_specialization_scope ()
  {
    tree scope = current_scope ();
--- 587,593 ----
  /* This routine is called when a specialization is declared.  If it is
     illegal to declare a specialization here, an error is reported.  */
  
! static void
  check_specialization_scope ()
  {
    tree scope = current_scope ();
*************** print_candidates (fns)
*** 920,926 ****
     If it is impossible to determine the result, an error message is
     issued.  The error_mark_node is returned to indicate failure.  */
  
! tree
  determine_specialization (template_id, decl, targs_out, 
  			  need_member_template)
       tree template_id;
--- 920,926 ----
     If it is impossible to determine the result, an error message is
     issued.  The error_mark_node is returned to indicate failure.  */
  
! static tree
  determine_specialization (template_id, decl, targs_out, 
  			  need_member_template)
       tree template_id;
*************** mark_template_parm (t, data)
*** 1950,1956 ****
  
  /* Process the partial specialization DECL.  */
  
! tree
  process_partial_specialization (decl)
       tree decl;
  {
--- 1950,1956 ----
  
  /* Process the partial specialization DECL.  */
  
! static tree
  process_partial_specialization (decl)
       tree decl;
  {
*************** lookup_template_function (fns, arglist)
*** 3462,3468 ****
     return the associated TEMPLATE_DECL.  Otherwise, the original
     DECL is returned.  */
  
! tree
  maybe_get_template_decl_from_type_decl (decl)
       tree decl;
  {
--- 3462,3468 ----
     return the associated TEMPLATE_DECL.  Otherwise, the original
     DECL is returned.  */
  
! static tree
  maybe_get_template_decl_from_type_decl (decl)
       tree decl;
  {
*************** lookup_template_class (d1, arglist, in_d
*** 3912,3918 ****
     returned by for_each_template_parm is 0.  If FN is NULL, it is
     considered to be the function which always returns 1.  */
  
! int
  for_each_template_parm (t, fn, data)
       tree t;
       tree_fn_t fn;
--- 3912,3918 ----
     returned by for_each_template_parm is 0.  If FN is NULL, it is
     considered to be the function which always returns 1.  */
  
! static int
  for_each_template_parm (t, fn, data)
       tree t;
       tree_fn_t fn;
*************** innermost_args (args)
*** 5091,5097 ****
  
  /* Substitute ARGS into the vector of template arguments T.  */
  
! tree
  tsubst_template_arg_vector (t, args, complain)
       tree t;
       tree args;
--- 5091,5097 ----
  
  /* Substitute ARGS into the vector of template arguments T.  */
  
! static tree
  tsubst_template_arg_vector (t, args, complain)
       tree t;
       tree args;
*************** tsubst_template_arg_vector (t, args, com
*** 5134,5140 ****
     template <T*, U, class V>' and ARGS is {{int}, {double}} then the
     result will be `template <int*, double, class V>'.  */
  
! tree
  tsubst_template_parms (parms, args, complain)
       tree parms;
       tree args;
--- 5134,5140 ----
     template <T*, U, class V>' and ARGS is {{int}, {double}} then the
     result will be `template <int*, double, class V>'.  */
  
! static tree
  tsubst_template_parms (parms, args, complain)
       tree parms;
       tree args;
*************** tsubst_template_parms (parms, args, comp
*** 5181,5187 ****
     ENTERING_SCOPE is non-zero, T is the context for a template which
     we are presently tsubst'ing.  Return the subsituted value.  */
  
! tree
  tsubst_aggr_type (t, args, complain, in_decl, entering_scope)
       tree t;
       tree args;
--- 5181,5187 ----
     ENTERING_SCOPE is non-zero, T is the context for a template which
     we are presently tsubst'ing.  Return the subsituted value.  */
  
! static tree
  tsubst_aggr_type (t, args, complain, in_decl, entering_scope)
       tree t;
       tree args;
*************** tsubst_aggr_type (t, args, complain, in_
*** 5253,5259 ****
     appropriate.  Return the result of the substitution.  IN_DECL is as
     for tsubst.  */
  
! tree
  tsubst_decl (t, args, type, in_decl)
       tree t;
       tree args;
--- 5253,5259 ----
     appropriate.  Return the result of the substitution.  IN_DECL is as
     for tsubst.  */
  
! static tree
  tsubst_decl (t, args, type, in_decl)
       tree t;
       tree args;
*************** tsubst_decl (t, args, type, in_decl)
*** 5771,5777 ****
  
  /* Substitue into the ARG_TYPES of a function type.  */
  
! tree
  tsubst_arg_types (arg_types, args, complain, in_decl)
       tree arg_types;
       tree args;
--- 5771,5777 ----
  
  /* Substitue into the ARG_TYPES of a function type.  */
  
! static tree
  tsubst_arg_types (arg_types, args, complain, in_decl)
       tree arg_types;
       tree args;
*************** tsubst_function_type (t, args, complain,
*** 5878,5884 ****
  
  /* Substitute into the PARMS of a call-declarator.  */
  
! tree
  tsubst_call_declarator_parms (parms, args, complain, in_decl)
       tree parms;
       tree args;
--- 5878,5884 ----
  
  /* Substitute into the PARMS of a call-declarator.  */
  
! static tree
  tsubst_call_declarator_parms (parms, args, complain, in_decl)
       tree parms;
       tree args;
*************** fn_type_unification (fn, explicit_targs,
*** 7305,7311 ****
     the argument passed to the call, or the type of the value
     intialized with the result of the conversion function.  */
  
! void
  maybe_adjust_types_for_deduction (strict, parm, arg)
       unification_kind_t strict;
       tree* parm;
--- 7305,7311 ----
     the argument passed to the call, or the type of the value
     intialized with the result of the conversion function.  */
  
! static void
  maybe_adjust_types_for_deduction (strict, parm, arg)
       unification_kind_t strict;
       tree* parm;
*************** get_template_base (tparms, targs, parm, 
*** 7847,7853 ****
  
  /* Returns the level of DECL, which declares a template parameter.  */
  
! int
  template_decl_level (decl)
       tree decl;
  {
--- 7847,7853 ----
  
  /* Returns the level of DECL, which declares a template parameter.  */
  
! static int
  template_decl_level (decl)
       tree decl;
  {
*************** template_decl_level (decl)
*** 7870,7876 ****
     cv-qualifiers of each type, given STRICT as documented for unify.
     Returns non-zero iff the unification is OK on that basis.*/
  
! int
  check_cv_quals_for_unify (strict, arg, parm)
       int strict;
       tree arg;
--- 7870,7876 ----
     cv-qualifiers of each type, given STRICT as documented for unify.
     Returns non-zero iff the unification is OK on that basis.*/
  
! static int
  check_cv_quals_for_unify (strict, arg, parm)
       int strict;
       tree arg;
*************** check_cv_quals_for_unify (strict, arg, p
*** 7900,7906 ****
         Allow any integral type to be deduced.  See the TEMPLATE_PARM_INDEX
         case for more information.  */
  
! int
  unify (tparms, targs, parm, arg, strict)
       tree tparms, targs, parm, arg;
       int strict;
--- 7900,7906 ----
         Allow any integral type to be deduced.  See the TEMPLATE_PARM_INDEX
         case for more information.  */
  
! static int
  unify (tparms, targs, parm, arg, strict)
       tree tparms, targs, parm, arg;
       int strict;
*************** most_specialized_instantiation (instanti
*** 8612,8618 ****
     produce an instantiation matching DECL, given the explicit template
     arguments EXPLICIT_ARGS.  */
  
! tree
  most_specialized (fns, decl, explicit_args)
       tree fns, decl, explicit_args;
  {
--- 8612,8618 ----
     produce an instantiation matching DECL, given the explicit template
     arguments EXPLICIT_ARGS.  */
  
! static tree
  most_specialized (fns, decl, explicit_args)
       tree fns, decl, explicit_args;
  {
*************** most_specialized (fns, decl, explicit_ar
*** 8646,8652 ****
     if TMPL is `template <class U> void S<int*>::f(U)' this will return
     `template <class T> template <class U> S<T*>::f(U)'.  */
  
! tree
  most_general_template (decl)
       tree decl;
  {
--- 8646,8652 ----
     if TMPL is `template <class U> void S<int*>::f(U)' this will return
     `template <class T> template <class U> S<T*>::f(U)'.  */
  
! static tree
  most_general_template (decl)
       tree decl;
  {
*************** most_general_template (decl)
*** 8660,8666 ****
     of TMPL which can produce an instantiation matching ARGS, or
     error_mark_node if the choice is ambiguous.  */
  
! tree
  most_specialized_class (tmpl, args)
       tree tmpl;
       tree args;
--- 8660,8666 ----
     of TMPL which can produce an instantiation matching ARGS, or
     error_mark_node if the choice is ambiguous.  */
  
! static tree
  most_specialized_class (tmpl, args)
       tree tmpl;
       tree args;
*************** do_type_instantiation (t, storage)
*** 8991,8997 ****
     first parameter, and the wrong type for the second.  So, when we go
     to instantiate the DECL, we regenerate it.  */
  
! void
  regenerate_decl_from_template (decl, tmpl)
       tree decl;
       tree tmpl;
--- 8991,8997 ----
     first parameter, and the wrong type for the second.  So, when we go
     to instantiate the DECL, we regenerate it.  */
  
! static void
  regenerate_decl_from_template (decl, tmpl)
       tree decl;
       tree tmpl;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]