Commit e9659ab0 by Jason Merrill Committed by Jason Merrill

class.c, [...]: Add 'static' to make SunOS 4 cc happy.

	* class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
	cc happy.
	* decl2.c (import_export_class): Also return if
	CLASSTYPE_INTERFACE_ONLY is set.

From-SVN: r25562
parent 4cdea273
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.
* decl2.c (import_export_class): Also return if
CLASSTYPE_INTERFACE_ONLY is set.
1999-03-03 Martin von Lwis <loewis@informatik.hu-berlin.de> 1999-03-03 Martin von Lwis <loewis@informatik.hu-berlin.de>
* decl.c (push_overloaded_decl): Only overwrite the old binding if * decl.c (push_overloaded_decl): Only overwrite the old binding if
......
...@@ -1450,7 +1450,7 @@ alter_access (t, binfo, fdecl, access) ...@@ -1450,7 +1450,7 @@ alter_access (t, binfo, fdecl, access)
/* Process the USING_DECL, which is a member of T. The METHOD_VEC, if /* 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. */ non-NULL, is the methods of T. The FIELDS are the fields of T. */
void static void
handle_using_decl (using_decl, t, method_vec, fields) handle_using_decl (using_decl, t, method_vec, fields)
tree using_decl; tree using_decl;
tree t; tree t;
......
...@@ -2067,7 +2067,7 @@ get_temp_regvar (type, init) ...@@ -2067,7 +2067,7 @@ get_temp_regvar (type, init)
returns a VAR_DECL whose size is the same as the size of the returns a VAR_DECL whose size is the same as the size of the
ANON_DECL, if one is available. */ ANON_DECL, if one is available. */
tree static tree
build_anon_union_vars (anon_decl, elems, static_p, external_p) build_anon_union_vars (anon_decl, elems, static_p, external_p)
tree anon_decl; tree anon_decl;
tree* elems; tree* elems;
...@@ -2474,6 +2474,14 @@ import_export_class (ctype) ...@@ -2474,6 +2474,14 @@ import_export_class (ctype)
if (CLASSTYPE_INTERFACE_KNOWN (ctype)) if (CLASSTYPE_INTERFACE_KNOWN (ctype))
return; return;
/* If MULTIPLE_SYMBOL_SPACES is defined and we saw a #pragma interface,
we will have CLASSTYPE_INTERFACE_ONLY set but not
CLASSTYPE_INTERFACE_KNOWN. In that case, we don't want to use this
heuristic because someone will supply a #pragma implementation
elsewhere, and deducing it here would produce a conflict. */
if (CLASSTYPE_INTERFACE_ONLY (ctype))
return;
#ifdef VALID_MACHINE_TYPE_ATTRIBUTE #ifdef VALID_MACHINE_TYPE_ATTRIBUTE
/* FIXME this should really use some sort of target-independent macro. */ /* FIXME this should really use some sort of target-independent macro. */
if (lookup_attribute ("dllimport", TYPE_ATTRIBUTES (ctype))) if (lookup_attribute ("dllimport", TYPE_ATTRIBUTES (ctype)))
......
...@@ -326,7 +326,7 @@ flush_repeats (nrepeats, type) ...@@ -326,7 +326,7 @@ flush_repeats (nrepeats, type)
/* Returns nonzero iff this is a type to which we will want to make /* Returns nonzero iff this is a type to which we will want to make
back-references (using the `B' code). */ back-references (using the `B' code). */
int static int
is_back_referenceable_type (type) is_back_referenceable_type (type)
tree type; tree type;
{ {
...@@ -1040,7 +1040,7 @@ build_qualified_name (decl) ...@@ -1040,7 +1040,7 @@ build_qualified_name (decl)
non-zero, mangled names for structure/union types are intentionally non-zero, mangled names for structure/union types are intentionally
mangled differently from the method described in the ARM. */ mangled differently from the method described in the ARM. */
void static void
build_mangled_name_for_type_with_Gcode (type, extra_Gcode) build_mangled_name_for_type_with_Gcode (type, extra_Gcode)
tree type; tree type;
int extra_Gcode; int extra_Gcode;
...@@ -1055,7 +1055,7 @@ build_mangled_name_for_type_with_Gcode (type, extra_Gcode) ...@@ -1055,7 +1055,7 @@ build_mangled_name_for_type_with_Gcode (type, extra_Gcode)
/* Like build_mangled_name_for_type_with_Gcode, but never outputs the /* Like build_mangled_name_for_type_with_Gcode, but never outputs the
`G'. */ `G'. */
void static void
build_mangled_name_for_type (type) build_mangled_name_for_type (type)
tree type; tree type;
{ {
...@@ -1203,7 +1203,7 @@ build_mangled_name (parmtypes, begin, end) ...@@ -1203,7 +1203,7 @@ build_mangled_name (parmtypes, begin, end)
/* Emit modifiers such as constant, read-only, and volatile. */ /* Emit modifiers such as constant, read-only, and volatile. */
void static void
process_modifiers (parmtype) process_modifiers (parmtype)
tree parmtype; tree parmtype;
{ {
...@@ -1231,7 +1231,7 @@ process_modifiers (parmtype) ...@@ -1231,7 +1231,7 @@ process_modifiers (parmtype)
so, return 1 and emit a backreference to TYPE. Otherwise, add TYPE so, return 1 and emit a backreference to TYPE. Otherwise, add TYPE
to the list of back-referenceable types and return 0. */ to the list of back-referenceable types and return 0. */
int static int
check_btype (type) check_btype (type)
tree type; tree type;
{ {
......
...@@ -273,7 +273,7 @@ finish_member_template_decl (decl) ...@@ -273,7 +273,7 @@ finish_member_template_decl (decl)
that, for example, `template_class_depth (current_class_type)' is that, for example, `template_class_depth (current_class_type)' is
always safe. */ always safe. */
int static int
template_class_depth_real (type, count_specializations) template_class_depth_real (type, count_specializations)
tree type; tree type;
int count_specializations; int count_specializations;
...@@ -587,7 +587,7 @@ begin_template_parm_list () ...@@ -587,7 +587,7 @@ begin_template_parm_list ()
/* This routine is called when a specialization is declared. If it is /* This routine is called when a specialization is declared. If it is
illegal to declare a specialization here, an error is reported. */ illegal to declare a specialization here, an error is reported. */
void static void
check_specialization_scope () check_specialization_scope ()
{ {
tree scope = current_scope (); tree scope = current_scope ();
...@@ -920,7 +920,7 @@ print_candidates (fns) ...@@ -920,7 +920,7 @@ print_candidates (fns)
If it is impossible to determine the result, an error message is If it is impossible to determine the result, an error message is
issued. The error_mark_node is returned to indicate failure. */ issued. The error_mark_node is returned to indicate failure. */
tree static tree
determine_specialization (template_id, decl, targs_out, determine_specialization (template_id, decl, targs_out,
need_member_template) need_member_template)
tree template_id; tree template_id;
...@@ -1950,7 +1950,7 @@ mark_template_parm (t, data) ...@@ -1950,7 +1950,7 @@ mark_template_parm (t, data)
/* Process the partial specialization DECL. */ /* Process the partial specialization DECL. */
tree static tree
process_partial_specialization (decl) process_partial_specialization (decl)
tree decl; tree decl;
{ {
...@@ -3462,7 +3462,7 @@ lookup_template_function (fns, arglist) ...@@ -3462,7 +3462,7 @@ lookup_template_function (fns, arglist)
return the associated TEMPLATE_DECL. Otherwise, the original return the associated TEMPLATE_DECL. Otherwise, the original
DECL is returned. */ DECL is returned. */
tree static tree
maybe_get_template_decl_from_type_decl (decl) maybe_get_template_decl_from_type_decl (decl)
tree decl; tree decl;
{ {
...@@ -3912,7 +3912,7 @@ lookup_template_class (d1, arglist, in_decl, context, entering_scope) ...@@ -3912,7 +3912,7 @@ lookup_template_class (d1, arglist, in_decl, context, entering_scope)
returned by for_each_template_parm is 0. If FN is NULL, it is returned by for_each_template_parm is 0. If FN is NULL, it is
considered to be the function which always returns 1. */ considered to be the function which always returns 1. */
int static int
for_each_template_parm (t, fn, data) for_each_template_parm (t, fn, data)
tree t; tree t;
tree_fn_t fn; tree_fn_t fn;
...@@ -5091,7 +5091,7 @@ innermost_args (args) ...@@ -5091,7 +5091,7 @@ innermost_args (args)
/* Substitute ARGS into the vector of template arguments T. */ /* Substitute ARGS into the vector of template arguments T. */
tree static tree
tsubst_template_arg_vector (t, args, complain) tsubst_template_arg_vector (t, args, complain)
tree t; tree t;
tree args; tree args;
...@@ -5134,7 +5134,7 @@ tsubst_template_arg_vector (t, args, complain) ...@@ -5134,7 +5134,7 @@ tsubst_template_arg_vector (t, args, complain)
template <T*, U, class V>' and ARGS is {{int}, {double}} then the template <T*, U, class V>' and ARGS is {{int}, {double}} then the
result will be `template <int*, double, class V>'. */ result will be `template <int*, double, class V>'. */
tree static tree
tsubst_template_parms (parms, args, complain) tsubst_template_parms (parms, args, complain)
tree parms; tree parms;
tree args; tree args;
...@@ -5181,7 +5181,7 @@ tsubst_template_parms (parms, args, complain) ...@@ -5181,7 +5181,7 @@ tsubst_template_parms (parms, args, complain)
ENTERING_SCOPE is non-zero, T is the context for a template which ENTERING_SCOPE is non-zero, T is the context for a template which
we are presently tsubst'ing. Return the subsituted value. */ we are presently tsubst'ing. Return the subsituted value. */
tree static tree
tsubst_aggr_type (t, args, complain, in_decl, entering_scope) tsubst_aggr_type (t, args, complain, in_decl, entering_scope)
tree t; tree t;
tree args; tree args;
...@@ -5253,7 +5253,7 @@ tsubst_aggr_type (t, args, complain, in_decl, entering_scope) ...@@ -5253,7 +5253,7 @@ tsubst_aggr_type (t, args, complain, in_decl, entering_scope)
appropriate. Return the result of the substitution. IN_DECL is as appropriate. Return the result of the substitution. IN_DECL is as
for tsubst. */ for tsubst. */
tree static tree
tsubst_decl (t, args, type, in_decl) tsubst_decl (t, args, type, in_decl)
tree t; tree t;
tree args; tree args;
...@@ -5771,7 +5771,7 @@ tsubst_decl (t, args, type, in_decl) ...@@ -5771,7 +5771,7 @@ tsubst_decl (t, args, type, in_decl)
/* Substitue into the ARG_TYPES of a function type. */ /* Substitue into the ARG_TYPES of a function type. */
tree static tree
tsubst_arg_types (arg_types, args, complain, in_decl) tsubst_arg_types (arg_types, args, complain, in_decl)
tree arg_types; tree arg_types;
tree args; tree args;
...@@ -5878,7 +5878,7 @@ tsubst_function_type (t, args, complain, in_decl) ...@@ -5878,7 +5878,7 @@ tsubst_function_type (t, args, complain, in_decl)
/* Substitute into the PARMS of a call-declarator. */ /* Substitute into the PARMS of a call-declarator. */
tree static tree
tsubst_call_declarator_parms (parms, args, complain, in_decl) tsubst_call_declarator_parms (parms, args, complain, in_decl)
tree parms; tree parms;
tree args; tree args;
...@@ -7305,7 +7305,7 @@ fn_type_unification (fn, explicit_targs, targs, args, return_type, ...@@ -7305,7 +7305,7 @@ fn_type_unification (fn, explicit_targs, targs, args, return_type,
the argument passed to the call, or the type of the value the argument passed to the call, or the type of the value
intialized with the result of the conversion function. */ intialized with the result of the conversion function. */
void static void
maybe_adjust_types_for_deduction (strict, parm, arg) maybe_adjust_types_for_deduction (strict, parm, arg)
unification_kind_t strict; unification_kind_t strict;
tree* parm; tree* parm;
...@@ -7847,7 +7847,7 @@ get_template_base (tparms, targs, parm, arg) ...@@ -7847,7 +7847,7 @@ get_template_base (tparms, targs, parm, arg)
/* Returns the level of DECL, which declares a template parameter. */ /* Returns the level of DECL, which declares a template parameter. */
int static int
template_decl_level (decl) template_decl_level (decl)
tree decl; tree decl;
{ {
...@@ -7870,7 +7870,7 @@ template_decl_level (decl) ...@@ -7870,7 +7870,7 @@ template_decl_level (decl)
cv-qualifiers of each type, given STRICT as documented for unify. cv-qualifiers of each type, given STRICT as documented for unify.
Returns non-zero iff the unification is OK on that basis.*/ Returns non-zero iff the unification is OK on that basis.*/
int static int
check_cv_quals_for_unify (strict, arg, parm) check_cv_quals_for_unify (strict, arg, parm)
int strict; int strict;
tree arg; tree arg;
...@@ -7900,7 +7900,7 @@ check_cv_quals_for_unify (strict, arg, parm) ...@@ -7900,7 +7900,7 @@ check_cv_quals_for_unify (strict, arg, parm)
Allow any integral type to be deduced. See the TEMPLATE_PARM_INDEX Allow any integral type to be deduced. See the TEMPLATE_PARM_INDEX
case for more information. */ case for more information. */
int static int
unify (tparms, targs, parm, arg, strict) unify (tparms, targs, parm, arg, strict)
tree tparms, targs, parm, arg; tree tparms, targs, parm, arg;
int strict; int strict;
...@@ -8612,7 +8612,7 @@ most_specialized_instantiation (instantiations, explicit_args) ...@@ -8612,7 +8612,7 @@ most_specialized_instantiation (instantiations, explicit_args)
produce an instantiation matching DECL, given the explicit template produce an instantiation matching DECL, given the explicit template
arguments EXPLICIT_ARGS. */ arguments EXPLICIT_ARGS. */
tree static tree
most_specialized (fns, decl, explicit_args) most_specialized (fns, decl, explicit_args)
tree fns, decl, explicit_args; tree fns, decl, explicit_args;
{ {
...@@ -8646,7 +8646,7 @@ most_specialized (fns, decl, explicit_args) ...@@ -8646,7 +8646,7 @@ most_specialized (fns, decl, explicit_args)
if TMPL is `template <class U> void S<int*>::f(U)' this will return if TMPL is `template <class U> void S<int*>::f(U)' this will return
`template <class T> template <class U> S<T*>::f(U)'. */ `template <class T> template <class U> S<T*>::f(U)'. */
tree static tree
most_general_template (decl) most_general_template (decl)
tree decl; tree decl;
{ {
...@@ -8660,7 +8660,7 @@ most_general_template (decl) ...@@ -8660,7 +8660,7 @@ most_general_template (decl)
of TMPL which can produce an instantiation matching ARGS, or of TMPL which can produce an instantiation matching ARGS, or
error_mark_node if the choice is ambiguous. */ error_mark_node if the choice is ambiguous. */
tree static tree
most_specialized_class (tmpl, args) most_specialized_class (tmpl, args)
tree tmpl; tree tmpl;
tree args; tree args;
...@@ -8991,7 +8991,7 @@ do_type_instantiation (t, storage) ...@@ -8991,7 +8991,7 @@ do_type_instantiation (t, storage)
first parameter, and the wrong type for the second. So, when we go first parameter, and the wrong type for the second. So, when we go
to instantiate the DECL, we regenerate it. */ to instantiate the DECL, we regenerate it. */
void static void
regenerate_decl_from_template (decl, tmpl) regenerate_decl_from_template (decl, tmpl)
tree decl; tree decl;
tree tmpl; tree tmpl;
......
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