On Thu, Apr 14, 2016 at 11:34 AM, Thomas Schwinge <tho...@codesourcery.com> wrote: > Hi! > > On Tue, 15 Apr 2014 09:58:41 +0200, Richard Biener > <richard.guent...@gmail.com> wrote: >> On Mon, Apr 14, 2014 at 4:48 PM, Patrick Palka <patr...@parcs.ath.cx> wrote: >> > This patch marks "static" a bunch of locally-used, non-debug functions >> > within the GCC sources. Doing so addresses a subset of the warnings >> > emitted >> > when compiling the GCC sources with -Wmissing-declarations. >> > >> > I bootstrapped and regtested this change on x86_64-unknown-linux-gnu. >> >> The gcc/ parts are ok. > > It seems this hasn't been committed. I just re-discovered that > gcc/omp-low.c:simd_clone_vector_of_formal_parm_types could/should be > static but isn't. Instead of now resolving that one individually: > Patrick, are you going to resolve the whole lot (in next stage 1, I > suppose)?
Yeah, I'll propose an updated version of this patch next stage one (and also try to make gcc build with -Wmissing-declarations). > > For reference: > >> > 2014-04-13 Patrick Palka <patr...@parcs.ath.cx> >> > >> > gcc/c/ >> > * c-array-notation.c (replace_invariant_exprs): Make static. >> > >> > gcc/cp/ >> > * class.c (inherit_targ_abi_tags): Make static. >> > * cp-array-notation.c (create_cmp_incr): Likewise. >> > * mangle.c (tree_string_cmp): Likewise. >> > * pt.c (fixed_parameter_pack_p): Likewise. >> > * vtable-class-hierarchy.c >> > (vtv_register_class_hierarchy_information): Likewise. >> > >> > gcc/fortran/ >> > * class.c (gfc_intrinsic_hash_value): Make static. >> > * trans-expr.c (gfc_conv_intrinsic_to_class): Likewise. >> > >> > gcc/ >> > * asan.c (asan_mem_ref_get_end, replace_invariant_exprs): Make >> > static. >> > * cgraphclones.c (redirect_edge_duplicating_thunks): Likewise. >> > * cgraphunit.c (decide_is_symbol_needed): Likewise. >> > * config/i386/i386.c (make_pass_insert_vzeroupper, >> > ix86_avx_emit_vzeroupper): Likewise. >> > * dwarf2out.c (init_addr_table_entry): Likewise. >> > * gengtype.c (get_string_option, already_seen_tag, >> > mark_tag_as_seen): Likewise. >> > * gimple-ssa-isolate-paths (isolate_path): Likewise. >> > * graphite.c (graphite_transform_loops): Likewise. >> > * internal-fn.c >> > (ubsan_expand_si_overflow_{addsub,neg,mul}_check): Likewise. >> > * ipa-devirt.c (hash_type_name, likely_target_p): Likewise. >> > * ipa-inline-analysis.c (simple_edge_hints): Likewise. >> > * ipa-profile.c (cmp_counts, contains_hot_call_p): Likewise. >> > * ipa-prop.c (ipa_alloc_node_params, >> > write_agg_replacement_chain): Likewise. >> > * ipa.c (can_replace_by_local_alias): Likewise. >> > * lto-streamer-out.c (output_spmbol_p): Likewise. >> > * omp-low.c (simd_clone_vector_of_formal_parm_types): Likewise. >> > * tree-inline.c (redirect_all_calls, freqs_to_counts): Likewise. >> > * tree-predcom.c (tree_predictive_commoning): Likewise. >> > * tree-sra.c (ipa_sra_modify_function_body): Likewise. >> > * tree-ssa-loop-im.c (movement_possibilyt, tree_ssa_lim): >> > Likewise. >> > * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables, >> > tree_unroll_loops_completely): Likewise. >> > * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Likewise. >> > * tree-ssa-loop-unswitch.c (tree_ssa_unswitch_loops): Likewise. >> > * tree-ssa-threadupdate.c (ssa_fix_duplicate_block_edges): >> > Likewise. >> > * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): >> > Likewise. >> > * ubsan.c (tree_type_map_hash): Likewise. >> > * varpool.c (varpool_call_variable_insertion_hooks): Likewise. >> > >> > libiberty/ >> > * make-temp-file.c (choose_tmpdir): Make static. >> > --- >> > gcc/asan.c | 4 ++-- >> > gcc/c/c-array-notation.c | 2 +- >> > gcc/cgraphclones.c | 2 +- >> > gcc/cgraphunit.c | 2 +- >> > gcc/config/i386/i386.c | 4 ++-- >> > gcc/cp/class.c | 2 +- >> > gcc/cp/cp-array-notation.c | 2 +- >> > gcc/cp/mangle.c | 2 +- >> > gcc/cp/pt.c | 2 +- >> > gcc/cp/vtable-class-hierarchy.c | 2 +- >> > gcc/dwarf2out.c | 2 +- >> > gcc/fortran/class.c | 2 +- >> > gcc/fortran/trans-expr.c | 2 +- >> > gcc/gengtype.c | 6 +++--- >> > gcc/gimple-ssa-isolate-paths.c | 2 +- >> > gcc/graphite.c | 2 +- >> > gcc/internal-fn.c | 6 +++--- >> > gcc/ipa-devirt.c | 4 ++-- >> > gcc/ipa-inline-analysis.c | 2 +- >> > gcc/ipa-profile.c | 4 ++-- >> > gcc/ipa-prop.c | 4 ++-- >> > gcc/ipa.c | 2 +- >> > gcc/lto-streamer-out.c | 2 +- >> > gcc/omp-low.c | 2 +- >> > gcc/tree-inline.c | 4 ++-- >> > gcc/tree-predcom.c | 2 +- >> > gcc/tree-sra.c | 2 +- >> > gcc/tree-ssa-loop-im.c | 4 ++-- >> > gcc/tree-ssa-loop-ivcanon.c | 4 ++-- >> > gcc/tree-ssa-loop-prefetch.c | 2 +- >> > gcc/tree-ssa-loop-unswitch.c | 2 +- >> > gcc/tree-ssa-threadupdate.c | 2 +- >> > gcc/tree-vect-loop-manip.c | 2 +- >> > gcc/ubsan.c | 2 +- >> > gcc/varpool.c | 2 +- >> > libiberty/make-temp-file.c | 2 +- >> > 36 files changed, 48 insertions(+), 48 deletions(-) >> > >> > diff --git a/gcc/asan.c b/gcc/asan.c >> > index 53992a8..de4058a 100644 >> > --- a/gcc/asan.c >> > +++ b/gcc/asan.c >> > @@ -299,7 +299,7 @@ asan_mem_ref_new (tree start, char access_size) >> > /* This builds and returns a pointer to the end of the memory region >> > that starts at START and of length LEN. */ >> > >> > -tree >> > +static tree >> > asan_mem_ref_get_end (tree start, tree len) >> > { >> > if (len == NULL_TREE || integer_zerop (len)) >> > @@ -312,7 +312,7 @@ asan_mem_ref_get_end (tree start, tree len) >> > memory region. Beware that this function can actually build a new >> > tree expression. */ >> > >> > -tree >> > +static tree >> > asan_mem_ref_get_end (const asan_mem_ref *ref, tree len) >> > { >> > return asan_mem_ref_get_end (ref->start, len); >> > diff --git a/gcc/c/c-array-notation.c b/gcc/c/c-array-notation.c >> > index 0ac6ba8..60412f5 100644 >> > --- a/gcc/c/c-array-notation.c >> > +++ b/gcc/c/c-array-notation.c >> > @@ -156,7 +156,7 @@ create_array_refs (location_t loc, vec<vec<an_parts> > >> > an_info, >> > holds the NODE along with variables that holds the results of the >> > invariant >> > expressions. */ >> > >> > -tree >> > +static tree >> > replace_invariant_exprs (tree *node) >> > { >> > size_t ix = 0; >> > diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c >> > index 257939c..d5e7bf0 100644 >> > --- a/gcc/cgraphclones.c >> > +++ b/gcc/cgraphclones.c >> > @@ -364,7 +364,7 @@ duplicate_thunk_for_node (cgraph_node *thunk, >> > cgraph_node *node, >> > one or more equivalent thunks for N and redirect E to the first in the >> > chain. */ >> > >> > -void >> > +static void >> > redirect_edge_duplicating_thunks (struct cgraph_edge *e, struct >> > cgraph_node *n, >> > bitmap args_to_skip) >> > { >> > diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c >> > index 06283fc..7498b7c 100644 >> > --- a/gcc/cgraphunit.c >> > +++ b/gcc/cgraphunit.c >> > @@ -236,7 +236,7 @@ static GTY (()) tree vtable_entry_type; >> > /* Determine if symbol DECL is needed. That is, visible to something >> > either outside this translation unit, something magic in the system >> > configury */ >> > -bool >> > +static bool >> > decide_is_symbol_needed (symtab_node *node) >> > { >> > tree decl = node->decl; >> > diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c >> > index 3eefe4a..cddbde6 100644 >> > --- a/gcc/config/i386/i386.c >> > +++ b/gcc/config/i386/i386.c >> > @@ -2550,7 +2550,7 @@ public: >> > >> > } // anon namespace >> > >> > -rtl_opt_pass * >> > +static rtl_opt_pass * >> > make_pass_insert_vzeroupper (gcc::context *ctxt) >> > { >> > return new pass_insert_vzeroupper (ctxt); >> > @@ -16382,7 +16382,7 @@ emit_i387_cw_initialization (int mode) >> > >> > /* Emit vzeroupper. */ >> > >> > -void >> > +static void >> > ix86_avx_emit_vzeroupper (HARD_REG_SET regs_live) >> > { >> > int i; >> > diff --git a/gcc/cp/class.c b/gcc/cp/class.c >> > index 334bfd5..45bdeb3 100644 >> > --- a/gcc/cp/class.c >> > +++ b/gcc/cp/class.c >> > @@ -1442,7 +1442,7 @@ check_abi_tags (tree t, tree subob) >> > mark_type_abi_tags (t, false); >> > } >> > >> > -void >> > +static void >> > inherit_targ_abi_tags (tree t) >> > { >> > if (CLASSTYPE_TEMPLATE_INFO (t) == NULL_TREE) >> > diff --git a/gcc/cp/cp-array-notation.c b/gcc/cp/cp-array-notation.c >> > index 65b8bcb..0c6516d 100644 >> > --- a/gcc/cp/cp-array-notation.c >> > +++ b/gcc/cp/cp-array-notation.c >> > @@ -136,7 +136,7 @@ create_array_refs (location_t loc, vec<vec<an_parts> > >> > an_info, >> > (of type POSTINCREMENT) and comparison (of TYPE LT_EXPR) expressions, >> > using >> > data from AN_INFO. */ >> > >> > -void >> > +static void >> > create_cmp_incr (location_t loc, vec <an_loop_parts> *node, size_t rank, >> > vec<vec<an_parts> > an_info, tsubst_flags_t complain) >> > { >> > diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c >> > index da82dd6..04af271 100644 >> > --- a/gcc/cp/mangle.c >> > +++ b/gcc/cp/mangle.c >> > @@ -1326,7 +1326,7 @@ write_source_name (tree identifier) >> > >> > /* Compare two TREE_STRINGs like strcmp. */ >> > >> > -int >> > +static int >> > tree_string_cmp (const void *p1, const void *p2) >> > { >> > if (p1 == p2) >> > diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c >> > index 318c325..d1c6eaa 100644 >> > --- a/gcc/cp/pt.c >> > +++ b/gcc/cp/pt.c >> > @@ -4366,7 +4366,7 @@ fixed_parameter_pack_p_1 (tree parm, struct >> > find_parameter_pack_data *ppd) >> > any such packs, it will be instantiated into a fixed template parameter >> > list by partial instantiation rather than be fully deduced. */ >> > >> > -tree >> > +static tree >> > fixed_parameter_pack_p (tree parm) >> > { >> > /* This can only be true in a member template. */ >> > diff --git a/gcc/cp/vtable-class-hierarchy.c >> > b/gcc/cp/vtable-class-hierarchy.c >> > index 6da17c7..19b39ac 100644 >> > --- a/gcc/cp/vtable-class-hierarchy.c >> > +++ b/gcc/cp/vtable-class-hierarchy.c >> > @@ -1134,7 +1134,7 @@ write_out_vtv_count_data (void) >> > the body of our constructior initialization function, to which we >> > add our function calls.*/ >> > >> > -bool >> > +static bool >> > vtv_register_class_hierarchy_information (tree init_routine_body) >> > { >> > bool registered_something = false; >> > diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c >> > index 67b37eb..90f1553 100644 >> > --- a/gcc/dwarf2out.c >> > +++ b/gcc/dwarf2out.c >> > @@ -4166,7 +4166,7 @@ addr_table_entry_eq (const void *x1, const void *x2) >> > >> > /* Initialize an addr_table_entry. */ >> > >> > -void >> > +static void >> > init_addr_table_entry (addr_table_entry *e, enum ate_kind kind, void >> > *addr) >> > { >> > e->kind = kind; >> > diff --git a/gcc/fortran/class.c b/gcc/fortran/class.c >> > index 346aee6..75a3fe6 100644 >> > --- a/gcc/fortran/class.c >> > +++ b/gcc/fortran/class.c >> > @@ -526,7 +526,7 @@ gfc_hash_value (gfc_symbol *sym) >> > >> > /* Assign a hash value for an intrinsic type. The algorithm is that of >> > SDBM. */ >> > >> > -unsigned int >> > +static unsigned int >> > gfc_intrinsic_hash_value (gfc_typespec *ts) >> > { >> > unsigned int hash = 0; >> > diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c >> > index 30931a3..a7583cb 100644 >> > --- a/gcc/fortran/trans-expr.c >> > +++ b/gcc/fortran/trans-expr.c >> > @@ -546,7 +546,7 @@ class_scalar_coarray_to_class (gfc_se *parmse, >> > gfc_expr *e, >> > >> > /* Takes an intrinsic type expression and returns the address of a >> > temporary >> > class object of the 'declared' type. */ >> > -void >> > +static void >> > gfc_conv_intrinsic_to_class (gfc_se *parmse, gfc_expr *e, >> > gfc_typespec class_ts) >> > { >> > diff --git a/gcc/gengtype.c b/gcc/gengtype.c >> > index 031004a..b497f20 100644 >> > --- a/gcc/gengtype.c >> > +++ b/gcc/gengtype.c >> > @@ -2648,7 +2648,7 @@ output_escaped_param (struct walk_type_data *d, >> > const char *param, >> > } >> > } >> > >> > -const char * >> > +static const char * >> > get_string_option (options_p opt, const char *key) >> > { >> > for (; opt; opt = opt->next) >> > @@ -2664,7 +2664,7 @@ struct seen_tag >> > struct seen_tag *next; >> > }; >> > >> > -int >> > +static int >> > already_seen_tag (struct seen_tag *seen_tags, const char *tag) >> > { >> > /* Linear search, so O(n^2), but n is currently small. */ >> > @@ -2678,7 +2678,7 @@ already_seen_tag (struct seen_tag *seen_tags, const >> > char *tag) >> > return 0; >> > } >> > >> > -void >> > +static void >> > mark_tag_as_seen (struct seen_tag **seen_tags, const char *tag) >> > { >> > /* Add to front of linked list. */ >> > diff --git a/gcc/gimple-ssa-isolate-paths.c >> > b/gcc/gimple-ssa-isolate-paths.c >> > index 56fcfc8..a75f019 100644 >> > --- a/gcc/gimple-ssa-isolate-paths.c >> > +++ b/gcc/gimple-ssa-isolate-paths.c >> > @@ -136,7 +136,7 @@ insert_trap_and_remove_trailing_statements >> > (gimple_stmt_iterator *si_p, tree op) >> > >> > Return BB'. */ >> > >> > -basic_block >> > +static basic_block >> > isolate_path (basic_block bb, basic_block duplicate, >> > edge e, gimple stmt, tree op) >> > { >> > diff --git a/gcc/graphite.c b/gcc/graphite.c >> > index 311b7e3..bb59a79 100644 >> > --- a/gcc/graphite.c >> > +++ b/gcc/graphite.c >> > @@ -262,7 +262,7 @@ isl_ctx *the_isl_ctx; >> > /* Perform a set of linear transforms on the loops of the current >> > function. */ >> > >> > -void >> > +static void >> > graphite_transform_loops (void) >> > { >> > int i; >> > diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c >> > index 1062ea8..f26494a 100644 >> > --- a/gcc/internal-fn.c >> > +++ b/gcc/internal-fn.c >> > @@ -162,7 +162,7 @@ expand_UBSAN_NULL (gimple stmt ATTRIBUTE_UNUSED) >> > /* Add sub/add overflow checking to the statement STMT. >> > CODE says whether the operation is +, or -. */ >> > >> > -void >> > +static void >> > ubsan_expand_si_overflow_addsub_check (tree_code code, gimple stmt) >> > { >> > rtx res, op0, op1; >> > @@ -310,7 +310,7 @@ ubsan_expand_si_overflow_addsub_check (tree_code code, >> > gimple stmt) >> > >> > /* Add negate overflow checking to the statement STMT. */ >> > >> > -void >> > +static void >> > ubsan_expand_si_overflow_neg_check (gimple stmt) >> > { >> > rtx res, op1; >> > @@ -386,7 +386,7 @@ ubsan_expand_si_overflow_neg_check (gimple stmt) >> > >> > /* Add mul overflow checking to the statement STMT. */ >> > >> > -void >> > +static void >> > ubsan_expand_si_overflow_mul_check (gimple stmt) >> > { >> > rtx res, op0, op1; >> > diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c >> > index 03a6c5b..3f57cc7 100644 >> > --- a/gcc/ipa-devirt.c >> > +++ b/gcc/ipa-devirt.c >> > @@ -193,7 +193,7 @@ struct odr_hasher >> > >> > /* Produce hash based on type name. */ >> > >> > -hashval_t >> > +static hashval_t >> > hash_type_name (tree t) >> > { >> > gcc_checking_assert (TYPE_MAIN_VARIANT (t) == t); >> > @@ -1708,7 +1708,7 @@ update_type_inheritance_graph (void) >> > Rule out cxa_pure_virtual, noreturns, function declared cold and >> > other obvious cases. */ >> > >> > -bool >> > +static bool >> > likely_target_p (struct cgraph_node *n) >> > { >> > int flags; >> > diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c >> > index 8e0f5dd..9286e3a 100644 >> > --- a/gcc/ipa-inline-analysis.c >> > +++ b/gcc/ipa-inline-analysis.c >> > @@ -3619,7 +3619,7 @@ inline_update_overall_summary (struct cgraph_node >> > *node) >> > } >> > >> > /* Return hints derrived from EDGE. */ >> > -int >> > +static int >> > simple_edge_hints (struct cgraph_edge *edge) >> > { >> > int hints = 0; >> > diff --git a/gcc/ipa-profile.c b/gcc/ipa-profile.c >> > index 17de687..5155053 100644 >> > --- a/gcc/ipa-profile.c >> > +++ b/gcc/ipa-profile.c >> > @@ -129,7 +129,7 @@ account_time_size (hash_table <histogram_hash> >> > hashtable, >> > (*val)->size += size; >> > } >> > >> > -int >> > +static int >> > cmp_counts (const void *v1, const void *v2) >> > { >> > const histogram_entry *h1 = *(const histogram_entry * const *)v1; >> > @@ -378,7 +378,7 @@ ipa_propagate_frequency_1 (struct cgraph_node *node, >> > void *data) >> > >> > /* Return ture if NODE contains hot calls. */ >> > >> > -bool >> > +static bool >> > contains_hot_call_p (struct cgraph_node *node) >> > { >> > struct cgraph_edge *e; >> > diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c >> > index 9f144fa..a93811b 100644 >> > --- a/gcc/ipa-prop.c >> > +++ b/gcc/ipa-prop.c >> > @@ -196,7 +196,7 @@ ipa_dump_param (FILE *file, struct ipa_node_params >> > *info, int i) >> > /* Initialize the ipa_node_params structure associated with NODE >> > to hold PARAM_COUNT parameters. */ >> > >> > -void >> > +static void >> > ipa_alloc_node_params (struct cgraph_node *node, int param_count) >> > { >> > struct ipa_node_params *info = IPA_NODE_REF (node); >> > @@ -4623,7 +4623,7 @@ ipa_update_after_lto_read (void) >> > ipa_check_create_edge_args (); >> > } >> > >> > -void >> > +static void >> > write_agg_replacement_chain (struct output_block *ob, struct cgraph_node >> > *node) >> > { >> > int node_ref; >> > diff --git a/gcc/ipa.c b/gcc/ipa.c >> > index 26e9b03..333110f 100644 >> > --- a/gcc/ipa.c >> > +++ b/gcc/ipa.c >> > @@ -892,7 +892,7 @@ varpool_externally_visible_p (varpool_node *vnode) >> > Local aliases save dynamic linking overhead and enable more >> > optimizations. >> > */ >> > >> > -bool >> > +static bool >> > can_replace_by_local_alias (symtab_node *node) >> > { >> > return (symtab_node_availability (node) > AVAIL_OVERWRITABLE >> > diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c >> > index 69b5a79..cd160b7 100644 >> > --- a/gcc/lto-streamer-out.c >> > +++ b/gcc/lto-streamer-out.c >> > @@ -2302,7 +2302,7 @@ write_symbol (struct streamer_tree_cache_d *cache, >> > >> > /* Return true if NODE should appear in the plugin symbol table. */ >> > >> > -bool >> > +static bool >> > output_symbol_p (symtab_node *node) >> > { >> > struct cgraph_node *cnode; >> > diff --git a/gcc/omp-low.c b/gcc/omp-low.c >> > index 11bb2d3..b1b9fce 100644 >> > --- a/gcc/omp-low.c >> > +++ b/gcc/omp-low.c >> > @@ -10696,7 +10696,7 @@ simd_clone_struct_copy (struct cgraph_simd_clone >> > *to, >> > TYPE_ARG_TYPES if available, otherwise falls back to types of >> > DECL_ARGUMENTS types. */ >> > >> > -vec<tree> >> > +static vec<tree> >> > simd_clone_vector_of_formal_parm_types (tree fndecl) >> > { >> > if (TYPE_ARG_TYPES (TREE_TYPE (fndecl))) >> > diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c >> > index 4293241..0a5c30a 100644 >> > --- a/gcc/tree-inline.c >> > +++ b/gcc/tree-inline.c >> > @@ -2370,7 +2370,7 @@ copy_loops (copy_body_data *id, >> > >> > /* Call cgraph_redirect_edge_call_stmt_to_callee on all calls in BB */ >> > >> > -void >> > +static void >> > redirect_all_calls (copy_body_data * id, basic_block bb) >> > { >> > gimple_stmt_iterator si; >> > @@ -2391,7 +2391,7 @@ redirect_all_calls (copy_body_data * id, basic_block >> > bb) >> > See the comments for handle_missing_profiles() in predict.c for >> > when this can happen for COMDATs. */ >> > >> > -void >> > +static void >> > freqs_to_counts (struct cgraph_node *node, gcov_type count) >> > { >> > basic_block bb; >> > diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c >> > index 730bad4..a204198 100644 >> > --- a/gcc/tree-predcom.c >> > +++ b/gcc/tree-predcom.c >> > @@ -2538,7 +2538,7 @@ end: ; >> > >> > /* Runs predictive commoning. */ >> > >> > -unsigned >> > +static unsigned >> > tree_predictive_commoning (void) >> > { >> > bool unrolled = false; >> > diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c >> > index ffef13d..24c7898 100644 >> > --- a/gcc/tree-sra.c >> > +++ b/gcc/tree-sra.c >> > @@ -4583,7 +4583,7 @@ sra_ipa_modify_assign (gimple *stmt_ptr, >> > gimple_stmt_iterator *gsi, >> > /* Traverse the function body and all modifications as described in >> > ADJUSTMENTS. Return true iff the CFG has been changed. */ >> > >> > -bool >> > +static bool >> > ipa_sra_modify_function_body (ipa_parm_adjustment_vec adjustments) >> > { >> > bool cfg_changed = false; >> > diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c >> > index c75f257..38ba1d7 100644 >> > --- a/gcc/tree-ssa-loop-im.c >> > +++ b/gcc/tree-ssa-loop-im.c >> > @@ -279,7 +279,7 @@ enum move_pos >> > because it may trap), return MOVE_PRESERVE_EXECUTION. >> > Otherwise return MOVE_IMPOSSIBLE. */ >> > >> > -enum move_pos >> > +static enum move_pos >> > movement_possibility (gimple stmt) >> > { >> > tree lhs; >> > @@ -2497,7 +2497,7 @@ tree_ssa_lim_finalize (void) >> > /* Moves invariants from loops. Only "expensive" invariants are moved >> > out -- >> > i.e. those that are likely to be win regardless of the register >> > pressure. */ >> > >> > -unsigned int >> > +static unsigned int >> > tree_ssa_lim (void) >> > { >> > unsigned int todo; >> > diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c >> > index b475b06..fda1d3c 100644 >> > --- a/gcc/tree-ssa-loop-ivcanon.c >> > +++ b/gcc/tree-ssa-loop-ivcanon.c >> > @@ -986,7 +986,7 @@ canonicalize_loop_induction_variables (struct loop >> > *loop, >> > /* The main entry point of the pass. Adds canonical induction variables >> > to the suitable loops. */ >> > >> > -unsigned int >> > +static unsigned int >> > canonicalize_induction_variables (void) >> > { >> > struct loop *loop; >> > @@ -1168,7 +1168,7 @@ tree_unroll_loops_completely_1 (bool >> > may_increase_size, bool unroll_outer, >> > MAY_INCREASE_SIZE is true, perform the unrolling only if the >> > size of the code does not increase. */ >> > >> > -unsigned int >> > +static unsigned int >> > tree_unroll_loops_completely (bool may_increase_size, bool unroll_outer) >> > { >> > auto_vec<loop_p, 16> father_stack; >> > diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c >> > index c0968c8..52afe95 100644 >> > --- a/gcc/tree-ssa-loop-prefetch.c >> > +++ b/gcc/tree-ssa-loop-prefetch.c >> > @@ -1931,7 +1931,7 @@ fail: >> > >> > /* Issue prefetch instructions for array references in loops. */ >> > >> > -unsigned int >> > +static unsigned int >> > tree_ssa_prefetch_arrays (void) >> > { >> > struct loop *loop; >> > diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c >> > index 5031378..155e486 100644 >> > --- a/gcc/tree-ssa-loop-unswitch.c >> > +++ b/gcc/tree-ssa-loop-unswitch.c >> > @@ -84,7 +84,7 @@ static tree tree_may_unswitch_on (basic_block, struct >> > loop *); >> > >> > /* Main entry point. Perform loop unswitching on all suitable loops. */ >> > >> > -unsigned int >> > +static unsigned int >> > tree_ssa_unswitch_loops (void) >> > { >> > struct loop *loop; >> > diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c >> > index f458d6a..315c781 100644 >> > --- a/gcc/tree-ssa-threadupdate.c >> > +++ b/gcc/tree-ssa-threadupdate.c >> > @@ -497,7 +497,7 @@ any_remaining_duplicated_blocks (vec<jump_thread_edge >> > *> *path, >> > >> > /* Wire up the outgoing edges from the duplicate blocks and >> > update any PHIs as needed. */ >> > -void >> > +static void >> > ssa_fix_duplicate_block_edges (struct redirection_data *rd, >> > ssa_local_info_t *local_info) >> > { >> > diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c >> > index 77d945e..75de7a6 100644 >> > --- a/gcc/tree-vect-loop-manip.c >> > +++ b/gcc/tree-vect-loop-manip.c >> > @@ -2208,7 +2208,7 @@ vect_create_cond_for_align_checks (loop_vec_info >> > loop_vinfo, >> > statement that controls which version of the loop gets executed at >> > runtime. >> > */ >> > >> > -void >> > +static void >> > vect_create_cond_for_alias_checks (loop_vec_info loop_vinfo, tree * >> > cond_expr) >> > { >> > vec<dr_with_seg_len_pair_t> comp_alias_ddrs = >> > diff --git a/gcc/ubsan.c b/gcc/ubsan.c >> > index ac40c85..72566b1 100644 >> > --- a/gcc/ubsan.c >> > +++ b/gcc/ubsan.c >> > @@ -60,7 +60,7 @@ struct GTY(()) tree_type_map { >> > >> > /* Hash from a tree in a tree_type_map. */ >> > >> > -unsigned int >> > +static unsigned int >> > tree_type_map_hash (const void *item) >> > { >> > return TYPE_UID (((const struct tree_type_map *)item)->type.from); >> > diff --git a/gcc/varpool.c b/gcc/varpool.c >> > index acb5221..fd69f8d 100644 >> > --- a/gcc/varpool.c >> > +++ b/gcc/varpool.c >> > @@ -119,7 +119,7 @@ varpool_remove_variable_insertion_hook (struct >> > varpool_node_hook_list *entry) >> > } >> > >> > /* Call all node insertion hooks. */ >> > -void >> > +static void >> > varpool_call_variable_insertion_hooks (varpool_node *node) >> > { >> > struct varpool_node_hook_list *entry = >> > first_varpool_variable_insertion_hook; >> > diff --git a/libiberty/make-temp-file.c b/libiberty/make-temp-file.c >> > index 7b74f81..27831a7 100644 >> > --- a/libiberty/make-temp-file.c >> > +++ b/libiberty/make-temp-file.c >> > @@ -102,7 +102,7 @@ files in. >> > >> > */ >> > >> > -char * >> > +static char * >> > choose_tmpdir (void) >> > { >> > if (!memoized_tmpdir) > > > Grüße > Thomas