Message ID | Pine.LNX.4.64.1012010132070.26868@digraph.polyomino.org.uk |
---|---|
State | New |
Headers | show |
On Wed, Dec 1, 2010 at 2:32 AM, Joseph S. Myers <joseph@codesourcery.com> wrote: > This patch completes cleaning up toplev.h and includes of toplev.h > along the lines I proposed in > <http://gcc.gnu.org/ml/gcc-patches/2010-11/msg02934.html>. Various > declarations move to other files as listed there, and files that no > longer need toplev.h includes have them removed. (This time I checked > the files still including toplev.h to avoid false positives from grep > where a function name was only mentioned in a comment or as a > substring of another function name, so that toplev.h was not in fact > needed although an initial grep suggested it was. Thus, I think all > remaining includes of toplev.h - 58 of them - are actually needed at > present.) > > Bootstrapped with no regressions on x86_64-unknown-linux-gnu. Also > tested building cc1 for crosses to: alpha-linux-gnu arc-elf arm-eabi > avr-elf bfin-elf cris-elf crx-elf fr30-elf frv-elf h8300-elf ia64-elf > iq2000-elf lm32-elf m32c-elf m32r-elf m68hc11-elf m68k-elf mcore-elf > mep-elf microblaze-elf mips-elf mmix-knuth-mmixware mn10300-elf > moxie-elf hppa-linux-gnu pdp11-none picochip-none s390-linux-gnu > score-elf sh-elf sparc-elf spu-elf xstormy16-elf v850-elf > vax-linux-gnu xtensa-elf. OK to commit? Ok. Thanks, Richard. > 2010-11-30 Joseph Myers <joseph@codesourcery.com> > > * common.opt (main_input_filename, main_input_basename, > main_input_baselength): New Variable entries. From toplev.c. > * final.c (output_quoted_string): Move from toplev.c. > * output.h (output_quoted_string): Move from toplev.h. > * opts-global.c (read_cmdline_options): Use gcc_options pointer to > access main_input_filename, main_input_baselength and > main_input_basename. > * targhooks.c: Include intl.h and opts.h. > (option_affects_pch_p, default_get_pch_validity): Move from > toplev.c. > * targhooks.h (option_affects_pch_p, default_get_pch_validity): > Move from toplev.h. > * toplev.c (main_input_filename, main_input_basename, > main_input_baselength): Move to common.opt. > (output_quoted_string): Move to final.c. > (warn_deprecated_use): Move to tree.c. > (option_affects_pch_p, default_get_pch_validity, > pch_option_mismatch, default_pch_valid_p): Move to targhooks.c. > * toplev.h (skip_leading_substring): Move to tree-dump.c. > (warn_deprecated_use): Move to tree.h. > (output_quoted_string): Move to output.h. > (main_input_filename, main_input_basename, main_input_baselength): > Move to common.opt. > (default_get_pch_validity, default_pch_valid_p): Move to > targhooks.c. > * tree-dump.c (skip_leading_substring): Move from toplev.h. > * tree.c (warn_deprecated_use): Move from toplev.c. > * tree.h (warn_deprecated_use): Move from toplev.h. > * c-typeck.c, config/alpha/alpha.c, config/arc/arc.c, > config/arm/arm.c, config/avr/avr.c, config/bfin/bfin.c, > config/cris/cris.c, config/crx/crx.c, config/fr30/fr30.c, > config/frv/frv.c, config/h8300/h8300.c, config/ia64/ia64.c, > config/iq2000/iq2000.c, config/lm32/lm32.c, config/m32c/m32c.c, > config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, > config/mcore/mcore.c, config/mep/mep.c, > config/microblaze/microblaze.c, config/mips/mips.c, > config/mmix/mmix.c, config/mn10300/mn10300.c, > config/moxie/moxie.c, config/pa/pa.c, config/pdp11/pdp11.c, > config/picochip/picochip.c, config/s390/s390.c, > config/score/score.c, config/sh/sh.c, config/sparc/sparc.c, > config/spu/spu.c, config/stormy16/stormy16.c, config/v850/v850.c, > config/vax/vax.c, config/xtensa/xtensa.c, gimple-low.c, > graphite-sese-to-poly.c, plugin.c, tree-cfg.c, tree-inline.c, > varasm.c, xcoffout.c: Don't include toplev.h. > * Makefile.in (c-typeck.o, tree-inline.o, tree-cfg.o, > gimple-low.o, graphite-sese-to-poly.o, targhooks.o, plugin.o, > varasm.o, xcoffout.o): Update dependencies. > * config/arm/t-arm (arm.o): Update dependencies. > * config/spu/t-spu-elf (spu.o): Update dependencies. > > 2010-11-30 Joseph Myers <joseph@codesourcery.com> > > * cp-objcp-common.c, lex.c, typeck.c: Don't include toplev.h. > * Make-lang.in (cp/lex.o, cp/cp-objcp-common.o, cp/typeck2.o): > Update dependencies. > > java: > 2010-11-30 Joseph Myers <joseph@codesourcery.com> > > * jcf-parse.c: Don't include toplev.h. > * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h. > > Index: gcc/targhooks.c > =================================================================== > --- gcc/targhooks.c (revision 167307) > +++ gcc/targhooks.c (working copy) > @@ -67,6 +67,8 @@ along with GCC; see the file COPYING3. > #include "reload.h" > #include "optabs.h" > #include "recog.h" > +#include "intl.h" > +#include "opts.h" > > > bool > @@ -1356,6 +1358,115 @@ default_get_reg_raw_mode(int regno) > return reg_raw_mode[regno]; > } > > +/* Return true if the state of option OPTION should be stored in PCH files > + and checked by default_pch_valid_p. Store the option's current state > + in STATE if so. */ > + > +static inline bool > +option_affects_pch_p (int option, struct cl_option_state *state) > +{ > + if ((cl_options[option].flags & CL_TARGET) == 0) > + return false; > + if (option_flag_var (option, &global_options) == &target_flags) > + if (targetm.check_pch_target_flags) > + return false; > + return get_option_state (&global_options, option, state); > +} > + > +/* Default version of get_pch_validity. > + By default, every flag difference is fatal; that will be mostly right for > + most targets, but completely right for very few. */ > + > +void * > +default_get_pch_validity (size_t *sz) > +{ > + struct cl_option_state state; > + size_t i; > + char *result, *r; > + > + *sz = 2; > + if (targetm.check_pch_target_flags) > + *sz += sizeof (target_flags); > + for (i = 0; i < cl_options_count; i++) > + if (option_affects_pch_p (i, &state)) > + *sz += state.size; > + > + result = r = XNEWVEC (char, *sz); > + r[0] = flag_pic; > + r[1] = flag_pie; > + r += 2; > + if (targetm.check_pch_target_flags) > + { > + memcpy (r, &target_flags, sizeof (target_flags)); > + r += sizeof (target_flags); > + } > + > + for (i = 0; i < cl_options_count; i++) > + if (option_affects_pch_p (i, &state)) > + { > + memcpy (r, state.data, state.size); > + r += state.size; > + } > + > + return result; > +} > + > +/* Return a message which says that a PCH file was created with a different > + setting of OPTION. */ > + > +static const char * > +pch_option_mismatch (const char *option) > +{ > + char *r; > + > + asprintf (&r, _("created and used with differing settings of '%s'"), option); > + if (r == NULL) > + return _("out of memory"); > + return r; > +} > + > +/* Default version of pch_valid_p. */ > + > +const char * > +default_pch_valid_p (const void *data_p, size_t len) > +{ > + struct cl_option_state state; > + const char *data = (const char *)data_p; > + size_t i; > + > + /* -fpic and -fpie also usually make a PCH invalid. */ > + if (data[0] != flag_pic) > + return _("created and used with different settings of -fpic"); > + if (data[1] != flag_pie) > + return _("created and used with different settings of -fpie"); > + data += 2; > + > + /* Check target_flags. */ > + if (targetm.check_pch_target_flags) > + { > + int tf; > + const char *r; > + > + memcpy (&tf, data, sizeof (target_flags)); > + data += sizeof (target_flags); > + len -= sizeof (target_flags); > + r = targetm.check_pch_target_flags (tf); > + if (r != NULL) > + return r; > + } > + > + for (i = 0; i < cl_options_count; i++) > + if (option_affects_pch_p (i, &state)) > + { > + if (memcmp (data, state.data, state.size) != 0) > + return pch_option_mismatch (cl_options[i].opt_text); > + data += state.size; > + len -= state.size; > + } > + > + return NULL; > +} > + > const struct default_options empty_optimization_table[] = > { > { OPT_LEVELS_NONE, 0, NULL, 0 } > Index: gcc/tree-dump.c > =================================================================== > --- gcc/tree-dump.c (revision 167307) > +++ gcc/tree-dump.c (working copy) > @@ -32,6 +32,11 @@ along with GCC; see the file COPYING3. > #include "langhooks.h" > #include "tree-iterator.h" > > +/* If non-NULL, return one past-the-end of the matching SUBPART of > + the WHOLE string. */ > +#define skip_leading_substring(whole, part) \ > + (strncmp (whole, part, strlen (part)) ? NULL : whole + strlen (part)) > + > static unsigned int queue (dump_info_p, const_tree, int); > static void dump_index (dump_info_p, unsigned int); > static void dequeue_and_dump (dump_info_p); > Index: gcc/targhooks.h > =================================================================== > --- gcc/targhooks.h (revision 167307) > +++ gcc/targhooks.h (working copy) > @@ -176,3 +176,6 @@ extern section * default_function_sectio > extern enum machine_mode default_get_reg_raw_mode(int); > > extern const struct default_options empty_optimization_table[]; > + > +extern void *default_get_pch_validity (size_t *); > +extern const char *default_pch_valid_p (const void *, size_t); > Index: gcc/java/jcf-parse.c > =================================================================== > --- gcc/java/jcf-parse.c (revision 167307) > +++ gcc/java/jcf-parse.c (working copy) > @@ -35,7 +35,6 @@ The Free Software Foundation is independ > #include "javaop.h" > #include "java-tree.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "parse.h" > #include "ggc.h" > #include "debug.h" > Index: gcc/java/Make-lang.in > =================================================================== > --- gcc/java/Make-lang.in (revision 167307) > +++ gcc/java/Make-lang.in (working copy) > @@ -295,7 +295,7 @@ java/expr.o: java/expr.c $(CONFIG_H) $(J > java/jcf-depend.o: java/jcf-depend.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ > java/jcf.h > java/jcf-parse.o: java/jcf-parse.c $(CONFIG_H) $(JAVA_TREE_H) $(FLAGS_H) \ > - input.h java/java-except.h $(SYSTEM_H) coretypes.h toplev.h \ > + input.h java/java-except.h $(SYSTEM_H) coretypes.h \ > java/parse.h $(GGC_H) debug.h $(REAL_H) gt-java-jcf-parse.h \ > java/jcf-reader.c java/zipfile.h java/jcf.h $(BITMAP_H) > java/jvgenmain.o: java/jvgenmain.c $(CONFIG_H) $(JAVA_TREE_H) $(SYSTEM_H) \ > Index: gcc/tree.c > =================================================================== > --- gcc/tree.c (revision 167307) > +++ gcc/tree.c (working copy) > @@ -11005,4 +11005,109 @@ typedef_variant_p (tree type) > return is_typedef_decl (TYPE_NAME (type)); > } > > +/* Warn about a use of an identifier which was marked deprecated. */ > +void > +warn_deprecated_use (tree node, tree attr) > +{ > + const char *msg; > + > + if (node == 0 || !warn_deprecated_decl) > + return; > + > + if (!attr) > + { > + if (DECL_P (node)) > + attr = DECL_ATTRIBUTES (node); > + else if (TYPE_P (node)) > + { > + tree decl = TYPE_STUB_DECL (node); > + if (decl) > + attr = lookup_attribute ("deprecated", > + TYPE_ATTRIBUTES (TREE_TYPE (decl))); > + } > + } > + > + if (attr) > + attr = lookup_attribute ("deprecated", attr); > + > + if (attr) > + msg = TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (attr))); > + else > + msg = NULL; > + > + if (DECL_P (node)) > + { > + expanded_location xloc = expand_location (DECL_SOURCE_LOCATION (node)); > + if (msg) > + warning (OPT_Wdeprecated_declarations, > + "%qD is deprecated (declared at %s:%d): %s", > + node, xloc.file, xloc.line, msg); > + else > + warning (OPT_Wdeprecated_declarations, > + "%qD is deprecated (declared at %s:%d)", > + node, xloc.file, xloc.line); > + } > + else if (TYPE_P (node)) > + { > + tree what = NULL_TREE; > + tree decl = TYPE_STUB_DECL (node); > + > + if (TYPE_NAME (node)) > + { > + if (TREE_CODE (TYPE_NAME (node)) == IDENTIFIER_NODE) > + what = TYPE_NAME (node); > + else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL > + && DECL_NAME (TYPE_NAME (node))) > + what = DECL_NAME (TYPE_NAME (node)); > + } > + > + if (decl) > + { > + expanded_location xloc > + = expand_location (DECL_SOURCE_LOCATION (decl)); > + if (what) > + { > + if (msg) > + warning (OPT_Wdeprecated_declarations, > + "%qE is deprecated (declared at %s:%d): %s", > + what, xloc.file, xloc.line, msg); > + else > + warning (OPT_Wdeprecated_declarations, > + "%qE is deprecated (declared at %s:%d)", what, > + xloc.file, xloc.line); > + } > + else > + { > + if (msg) > + warning (OPT_Wdeprecated_declarations, > + "type is deprecated (declared at %s:%d): %s", > + xloc.file, xloc.line, msg); > + else > + warning (OPT_Wdeprecated_declarations, > + "type is deprecated (declared at %s:%d)", > + xloc.file, xloc.line); > + } > + } > + else > + { > + if (what) > + { > + if (msg) > + warning (OPT_Wdeprecated_declarations, "%qE is deprecated: %s", > + what, msg); > + else > + warning (OPT_Wdeprecated_declarations, "%qE is deprecated", what); > + } > + else > + { > + if (msg) > + warning (OPT_Wdeprecated_declarations, "type is deprecated: %s", > + msg); > + else > + warning (OPT_Wdeprecated_declarations, "type is deprecated"); > + } > + } > + } > +} > + > #include "gt-tree.h" > Index: gcc/tree.h > =================================================================== > --- gcc/tree.h (revision 167307) > +++ gcc/tree.h (working copy) > @@ -4959,6 +4959,7 @@ extern tree tree_strip_nop_conversions ( > extern tree tree_strip_sign_nop_conversions (tree); > extern tree lhd_gcc_personality (void); > extern void assign_assembler_name_if_neeeded (tree); > +extern void warn_deprecated_use (tree, tree); > > > /* In cgraph.c */ > Index: gcc/final.c > =================================================================== > --- gcc/final.c (revision 167307) > +++ gcc/final.c (working copy) > @@ -3620,6 +3620,32 @@ output_addr_const (FILE *file, rtx x) > } > } > > +/* Output a quoted string. */ > + > +void > +output_quoted_string (FILE *asm_file, const char *string) > +{ > +#ifdef OUTPUT_QUOTED_STRING > + OUTPUT_QUOTED_STRING (asm_file, string); > +#else > + char c; > + > + putc ('\"', asm_file); > + while ((c = *string++) != 0) > + { > + if (ISPRINT (c)) > + { > + if (c == '\"' || c == '\\') > + putc ('\\', asm_file); > + putc (c, asm_file); > + } > + else > + fprintf (asm_file, "\\%03o", (unsigned char) c); > + } > + putc ('\"', asm_file); > +#endif > +} > + > /* A poor man's fprintf, with the added features of %I, %R, %L, and %U. > %R prints the value of REGISTER_PREFIX. > %L prints the value of LOCAL_LABEL_PREFIX. > Index: gcc/toplev.c > =================================================================== > --- gcc/toplev.c (revision 167307) > +++ gcc/toplev.c (working copy) > @@ -116,18 +116,6 @@ static bool no_backend; > struct cl_decoded_option *save_decoded_options; > unsigned int save_decoded_options_count; > > -/* Name of top-level original source file (what was input to cpp). > - This comes from the #-command at the beginning of the actual input. > - If there isn't any there, then this is the cc1 input file name. */ > - > -const char *main_input_filename; > - > -/* Pointer to base name in main_input_filename, with directories and a > - single final extension removed, and the length of this base > - name. */ > -const char *main_input_basename; > -int main_input_baselength; > - > /* Used to enable -fvar-tracking, -fweb and -frename-registers according > to optimize in process_options (). */ > #define AUTODETECT_VALUE 2 > @@ -374,32 +362,6 @@ crash_signal (int signo) > internal_error ("%s", strsignal (signo)); > } > > -/* Output a quoted string. */ > - > -void > -output_quoted_string (FILE *asm_file, const char *string) > -{ > -#ifdef OUTPUT_QUOTED_STRING > - OUTPUT_QUOTED_STRING (asm_file, string); > -#else > - char c; > - > - putc ('\"', asm_file); > - while ((c = *string++) != 0) > - { > - if (ISPRINT (c)) > - { > - if (c == '\"' || c == '\\') > - putc ('\\', asm_file); > - putc (c, asm_file); > - } > - else > - fprintf (asm_file, "\\%03o", (unsigned char) c); > - } > - putc ('\"', asm_file); > -#endif > -} > - > /* A subroutine of wrapup_global_declarations. We've come to the end of > the compilation unit. All deferred variables should be undeferred, > and all incomplete decls should be finalized. */ > @@ -597,111 +559,6 @@ emit_debug_global_declarations (tree *ve > timevar_pop (TV_SYMOUT); > } > > -/* Warn about a use of an identifier which was marked deprecated. */ > -void > -warn_deprecated_use (tree node, tree attr) > -{ > - const char *msg; > - > - if (node == 0 || !warn_deprecated_decl) > - return; > - > - if (!attr) > - { > - if (DECL_P (node)) > - attr = DECL_ATTRIBUTES (node); > - else if (TYPE_P (node)) > - { > - tree decl = TYPE_STUB_DECL (node); > - if (decl) > - attr = lookup_attribute ("deprecated", > - TYPE_ATTRIBUTES (TREE_TYPE (decl))); > - } > - } > - > - if (attr) > - attr = lookup_attribute ("deprecated", attr); > - > - if (attr) > - msg = TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (attr))); > - else > - msg = NULL; > - > - if (DECL_P (node)) > - { > - expanded_location xloc = expand_location (DECL_SOURCE_LOCATION (node)); > - if (msg) > - warning (OPT_Wdeprecated_declarations, > - "%qD is deprecated (declared at %s:%d): %s", > - node, xloc.file, xloc.line, msg); > - else > - warning (OPT_Wdeprecated_declarations, > - "%qD is deprecated (declared at %s:%d)", > - node, xloc.file, xloc.line); > - } > - else if (TYPE_P (node)) > - { > - tree what = NULL_TREE; > - tree decl = TYPE_STUB_DECL (node); > - > - if (TYPE_NAME (node)) > - { > - if (TREE_CODE (TYPE_NAME (node)) == IDENTIFIER_NODE) > - what = TYPE_NAME (node); > - else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL > - && DECL_NAME (TYPE_NAME (node))) > - what = DECL_NAME (TYPE_NAME (node)); > - } > - > - if (decl) > - { > - expanded_location xloc > - = expand_location (DECL_SOURCE_LOCATION (decl)); > - if (what) > - { > - if (msg) > - warning (OPT_Wdeprecated_declarations, > - "%qE is deprecated (declared at %s:%d): %s", > - what, xloc.file, xloc.line, msg); > - else > - warning (OPT_Wdeprecated_declarations, > - "%qE is deprecated (declared at %s:%d)", what, > - xloc.file, xloc.line); > - } > - else > - { > - if (msg) > - warning (OPT_Wdeprecated_declarations, > - "type is deprecated (declared at %s:%d): %s", > - xloc.file, xloc.line, msg); > - else > - warning (OPT_Wdeprecated_declarations, > - "type is deprecated (declared at %s:%d)", > - xloc.file, xloc.line); > - } > - } > - else > - { > - if (what) > - { > - if (msg) > - warning (OPT_Wdeprecated_declarations, "%qE is deprecated: %s", > - what, msg); > - else > - warning (OPT_Wdeprecated_declarations, "%qE is deprecated", what); > - } > - else > - { > - if (msg) > - warning (OPT_Wdeprecated_declarations, "type is deprecated: %s", > - msg); > - else > - warning (OPT_Wdeprecated_declarations, "type is deprecated"); > - } > - } > - } > -} > - > /* Compile an entire translation unit. Write a file of assembly > output and various debugging dumps. */ > > @@ -1108,115 +965,6 @@ init_asm_output (const char *name) > } > } > > -/* Return true if the state of option OPTION should be stored in PCH files > - and checked by default_pch_valid_p. Store the option's current state > - in STATE if so. */ > - > -static inline bool > -option_affects_pch_p (int option, struct cl_option_state *state) > -{ > - if ((cl_options[option].flags & CL_TARGET) == 0) > - return false; > - if (option_flag_var (option, &global_options) == &target_flags) > - if (targetm.check_pch_target_flags) > - return false; > - return get_option_state (&global_options, option, state); > -} > - > -/* Default version of get_pch_validity. > - By default, every flag difference is fatal; that will be mostly right for > - most targets, but completely right for very few. */ > - > -void * > -default_get_pch_validity (size_t *sz) > -{ > - struct cl_option_state state; > - size_t i; > - char *result, *r; > - > - *sz = 2; > - if (targetm.check_pch_target_flags) > - *sz += sizeof (target_flags); > - for (i = 0; i < cl_options_count; i++) > - if (option_affects_pch_p (i, &state)) > - *sz += state.size; > - > - result = r = XNEWVEC (char, *sz); > - r[0] = flag_pic; > - r[1] = flag_pie; > - r += 2; > - if (targetm.check_pch_target_flags) > - { > - memcpy (r, &target_flags, sizeof (target_flags)); > - r += sizeof (target_flags); > - } > - > - for (i = 0; i < cl_options_count; i++) > - if (option_affects_pch_p (i, &state)) > - { > - memcpy (r, state.data, state.size); > - r += state.size; > - } > - > - return result; > -} > - > -/* Return a message which says that a PCH file was created with a different > - setting of OPTION. */ > - > -static const char * > -pch_option_mismatch (const char *option) > -{ > - char *r; > - > - asprintf (&r, _("created and used with differing settings of '%s'"), option); > - if (r == NULL) > - return _("out of memory"); > - return r; > -} > - > -/* Default version of pch_valid_p. */ > - > -const char * > -default_pch_valid_p (const void *data_p, size_t len) > -{ > - struct cl_option_state state; > - const char *data = (const char *)data_p; > - size_t i; > - > - /* -fpic and -fpie also usually make a PCH invalid. */ > - if (data[0] != flag_pic) > - return _("created and used with different settings of -fpic"); > - if (data[1] != flag_pie) > - return _("created and used with different settings of -fpie"); > - data += 2; > - > - /* Check target_flags. */ > - if (targetm.check_pch_target_flags) > - { > - int tf; > - const char *r; > - > - memcpy (&tf, data, sizeof (target_flags)); > - data += sizeof (target_flags); > - len -= sizeof (target_flags); > - r = targetm.check_pch_target_flags (tf); > - if (r != NULL) > - return r; > - } > - > - for (i = 0; i < cl_options_count; i++) > - if (option_affects_pch_p (i, &state)) > - { > - if (memcmp (data, state.data, state.size) != 0) > - return pch_option_mismatch (cl_options[i].opt_text); > - data += state.size; > - len -= state.size; > - } > - > - return NULL; > -} > - > /* Default tree printer. Handles declarations only. */ > bool > default_tree_printer (pretty_printer *pp, text_info *text, const char *spec, > Index: gcc/toplev.h > =================================================================== > --- gcc/toplev.h (revision 167307) > +++ gcc/toplev.h (working copy) > @@ -22,11 +22,6 @@ along with GCC; see the file COPYING3. > #ifndef GCC_TOPLEV_H > #define GCC_TOPLEV_H > > -/* If non-NULL, return one past-the-end of the matching SUBPART of > - the WHOLE string. */ > -#define skip_leading_substring(whole, part) \ > - (strncmp (whole, part, strlen (part)) ? NULL : whole + strlen (part)) > - > /* Decoded options, and number of such options. */ > extern struct cl_decoded_option *save_decoded_options; > extern unsigned int save_decoded_options_count; > @@ -46,12 +41,6 @@ extern void init_eh (void); > > extern void announce_function (tree); > > -extern void warn_deprecated_use (tree, tree); > - > -#ifdef BUFSIZ > -extern void output_quoted_string (FILE *, const char *); > -#endif > - > extern void wrapup_global_declaration_1 (tree); > extern bool wrapup_global_declaration_2 (tree); > extern bool wrapup_global_declarations (tree *, int); > @@ -67,11 +56,6 @@ extern void target_reinit (void); > /* A unique local time stamp, might be zero if none is available. */ > extern unsigned local_tick; > > -/* Top-level source file. */ > -extern const char *main_input_filename; > -extern const char *main_input_basename; > -extern int main_input_baselength; > - > /* True if the user has tagged the function with the 'section' > attribute. */ > > @@ -80,10 +64,7 @@ extern bool user_defined_section_attribu > /* See toplev.c. */ > extern int flag_rerun_cse_after_global_opts; > > -/* Things to do with target switches. */ > extern void print_version (FILE *, const char *); > -extern void * default_get_pch_validity (size_t *); > -extern const char * default_pch_valid_p (const void *, size_t); > > /* The hashtable, so that the C front ends can pass it to cpplib. */ > extern struct ht *ident_hash; > Index: gcc/cp/typeck.c > =================================================================== > --- gcc/cp/typeck.c (revision 167307) > +++ gcc/cp/typeck.c (working copy) > @@ -34,7 +34,6 @@ along with GCC; see the file COPYING3. > #include "cp-tree.h" > #include "flags.h" > #include "output.h" > -#include "toplev.h" > #include "diagnostic.h" > #include "intl.h" > #include "target.h" > Index: gcc/cp/Make-lang.in > =================================================================== > --- gcc/cp/Make-lang.in (revision 167307) > +++ gcc/cp/Make-lang.in (working copy) > @@ -247,7 +247,7 @@ CXX_TREE_H = $(TREE_H) cp/name-lookup.h > CXX_PRETTY_PRINT_H = cp/cxx-pretty-print.h $(C_PRETTY_PRINT_H) > > cp/lex.o: cp/lex.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) \ > - $(C_PRAGMA_H) toplev.h output.h input.h cp/operators.def $(TM_P_H) > + $(C_PRAGMA_H) output.h input.h cp/operators.def $(TM_P_H) > cp/cp-lang.o: cp/cp-lang.c $(CXX_TREE_H) $(TM_H) debug.h langhooks.h \ > $(LANGHOOKS_DEF_H) $(C_COMMON_H) gtype-cp.h gt-cp-cp-lang.h \ > cp/cp-objcp-common.h $(EXPR_H) $(TARGET_H) > @@ -261,14 +261,14 @@ cp/decl2.o: cp/decl2.c $(CXX_TREE_H) $(T > $(C_PRAGMA_H) $(TREE_DUMP_H) intl.h $(TARGET_H) $(GIMPLE_H) $(POINTER_SET_H) \ > $(SPLAY_TREE_H) c-family/c-ada-spec.h > cp/cp-objcp-common.o : cp/cp-objcp-common.c $(CONFIG_H) $(SYSTEM_H) \ > - coretypes.h $(TM_H) $(TREE_H) $(CXX_TREE_H) $(C_COMMON_H) toplev.h \ > + coretypes.h $(TM_H) $(TREE_H) $(CXX_TREE_H) $(C_COMMON_H) \ > langhooks.h $(LANGHOOKS_DEF_H) $(DIAGNOSTIC_H) debug.h \ > $(CXX_PRETTY_PRINT_H) cp/cp-objcp-common.h gt-cp-cp-objcp-common.h > cp/typeck2.o: cp/typeck2.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) output.h \ > $(TM_P_H) $(DIAGNOSTIC_CORE_H) gt-cp-typeck2.h $(REAL_H) intl.h > cp/typeck.o: cp/typeck.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) \ > toplev.h $(DIAGNOSTIC_H) convert.h $(C_COMMON_H) $(TARGET_H) \ > - output.h toplev.h > + output.h > cp/class.o: cp/class.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) toplev.h \ > $(TARGET_H) convert.h $(CGRAPH_H) $(TREE_DUMP_H) gt-cp-class.h \ > $(SPLAY_TREE_H) > Index: gcc/cp/cp-objcp-common.c > =================================================================== > --- gcc/cp/cp-objcp-common.c (revision 167307) > +++ gcc/cp/cp-objcp-common.c (working copy) > @@ -25,7 +25,6 @@ along with GCC; see the file COPYING3. > #include "tree.h" > #include "cp-tree.h" > #include "c-family/c-common.h" > -#include "toplev.h" > #include "langhooks.h" > #include "langhooks-def.h" > #include "diagnostic.h" > Index: gcc/cp/lex.c > =================================================================== > --- gcc/cp/lex.c (revision 167307) > +++ gcc/cp/lex.c (working copy) > @@ -33,7 +33,6 @@ along with GCC; see the file COPYING3. > #include "cpplib.h" > #include "flags.h" > #include "c-family/c-pragma.h" > -#include "toplev.h" > #include "output.h" > #include "tm_p.h" > #include "timevar.h" > Index: gcc/xcoffout.c > =================================================================== > --- gcc/xcoffout.c (revision 167307) > +++ gcc/xcoffout.c (working copy) > @@ -31,7 +31,6 @@ along with GCC; see the file COPYING3. > #include "rtl.h" > #include "flags.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "output.h" > #include "ggc.h" > #include "target.h" > Index: gcc/gimple-low.c > =================================================================== > --- gcc/gimple-low.c (revision 167307) > +++ gcc/gimple-low.c (working copy) > @@ -31,7 +31,6 @@ along with GCC; see the file COPYING3. > #include "flags.h" > #include "function.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "tree-pass.h" > > /* The differences between High GIMPLE and Low GIMPLE are the > Index: gcc/c-typeck.c > =================================================================== > --- gcc/c-typeck.c (revision 167307) > +++ gcc/c-typeck.c (working copy) > @@ -35,7 +35,6 @@ along with GCC; see the file COPYING3. > #include "c-lang.h" > #include "flags.h" > #include "output.h" > -#include "toplev.h" > #include "intl.h" > #include "target.h" > #include "tree-iterator.h" > Index: gcc/common.opt > =================================================================== > --- gcc/common.opt (revision 167307) > +++ gcc/common.opt (working copy) > @@ -157,6 +157,22 @@ int flag_print_asm_name > Variable > enum graph_dump_types graph_dump_format = no_graph > > +; Name of top-level original source file (what was input to cpp). > +; This comes from the #-command at the beginning of the actual input. > +; If there isn't any there, then this is the cc1 input file name. > +Variable > +const char *main_input_filename > + > +; Pointer to base name in main_input_filename, with directories and a > +; single final extension removed, and the length of this base > +; name. > + > +Variable > +const char *main_input_basename > + > +Variable > +int main_input_baselength > + > ; Which options have been printed by --help. > Variable > char *help_printed > Index: gcc/varasm.c > =================================================================== > --- gcc/varasm.c (revision 167307) > +++ gcc/varasm.c (working copy) > @@ -40,7 +40,6 @@ along with GCC; see the file COPYING3. > #include "regs.h" > #include "output.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "hashtab.h" > #include "ggc.h" > #include "langhooks.h" > Index: gcc/tree-inline.c > =================================================================== > --- gcc/tree-inline.c (revision 167307) > +++ gcc/tree-inline.c (working copy) > @@ -23,7 +23,6 @@ along with GCC; see the file COPYING3. > #include "system.h" > #include "coretypes.h" > #include "tm.h" > -#include "toplev.h" /* floor_log2 */ > #include "diagnostic-core.h" > #include "tree.h" > #include "tree-inline.h" > Index: gcc/graphite-sese-to-poly.c > =================================================================== > --- gcc/graphite-sese-to-poly.c (revision 167307) > +++ gcc/graphite-sese-to-poly.c (working copy) > @@ -28,7 +28,6 @@ along with GCC; see the file COPYING3. > #include "basic-block.h" > #include "diagnostic.h" > #include "tree-flow.h" > -#include "toplev.h" > #include "tree-dump.h" > #include "timevar.h" > #include "cfgloop.h" > Index: gcc/output.h > =================================================================== > --- gcc/output.h (revision 167307) > +++ gcc/output.h (working copy) > @@ -298,6 +298,8 @@ extern void output_shared_constant_pool > > extern void output_object_blocks (void); > > +extern void output_quoted_string (FILE *, const char *); > + > /* Whether a constructor CTOR is a valid static constant initializer if all > its elements are. This used to be internal to initializer_constant_valid_p > and has been exposed to let other functions like categorize_ctor_elements > Index: gcc/plugin.c > =================================================================== > --- gcc/plugin.c (revision 167307) > +++ gcc/plugin.c (working copy) > @@ -33,7 +33,6 @@ along with GCC; see the file COPYING3. > > #include "coretypes.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "tree.h" > #include "tree-pass.h" > #include "intl.h" > Index: gcc/opts-global.c > =================================================================== > --- gcc/opts-global.c (revision 167307) > +++ gcc/opts-global.c (working copy) > @@ -229,11 +229,12 @@ read_cmdline_options (struct gcc_options > gcc_assert (opts == &global_options); > gcc_assert (opts_set == &global_options_set); > > - if (main_input_filename == NULL) > + if (opts->x_main_input_filename == NULL) > { > - main_input_filename = decoded_options[i].arg; > - main_input_baselength > - = base_of_path (main_input_filename, &main_input_basename); > + opts->x_main_input_filename = decoded_options[i].arg; > + opts->x_main_input_baselength > + = base_of_path (opts->x_main_input_filename, > + &opts->x_main_input_basename); > } > add_input_filename (decoded_options[i].arg); > continue; > Index: gcc/Makefile.in > =================================================================== > --- gcc/Makefile.in (revision 167307) > +++ gcc/Makefile.in (working copy) > @@ -2050,7 +2050,7 @@ c-parser.o : c-parser.c $(CONFIG_H) $(SY > > c-typeck.o : c-typeck.c c-lang.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ > $(TREE_H) $(C_TREE_H) $(TARGET_H) $(FLAGS_H) intl.h output.h $(EXPR_H) \ > - toplev.h langhooks.h tree-iterator.h $(BITMAP_H) $(GIMPLE_H) > + langhooks.h tree-iterator.h $(BITMAP_H) $(GIMPLE_H) > > > > @@ -2352,7 +2352,7 @@ tree-dump.o: tree-dump.c $(CONFIG_H) $(S > tree-iterator.h $(TREE_PASS_H) $(DIAGNOSTIC_H) > tree-inline.o : tree-inline.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ > $(TREE_H) $(RTL_H) $(EXPR_H) $(FLAGS_H) $(PARAMS_H) $(INPUT_H) insn-config.h \ > - $(HASHTAB_H) toplev.h langhooks.h $(TREE_INLINE_H) $(CGRAPH_H) \ > + $(HASHTAB_H) langhooks.h $(TREE_INLINE_H) $(CGRAPH_H) \ > intl.h $(FUNCTION_H) $(GIMPLE_H) \ > debug.h $(DIAGNOSTIC_H) $(EXCEPT_H) $(TREE_FLOW_H) tree-iterator.h tree-mudflap.h \ > $(IPA_PROP_H) value-prof.h $(TREE_PASS_H) $(TARGET_H) $(INTEGRATE_H) \ > @@ -2498,7 +2498,7 @@ tree-cfg.o : tree-cfg.c $(TREE_FLOW_H) $ > $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) $(FLAGS_H) output.h \ > $(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \ > $(TREE_DUMP_H) $(EXCEPT_H) langhooks.h $(CFGLOOP_H) $(TREE_PASS_H) \ > - $(CFGLAYOUT_H) $(BASIC_BLOCK_H) toplev.h \ > + $(CFGLAYOUT_H) $(BASIC_BLOCK_H) \ > value-prof.h tree-ssa-propagate.h $(TREE_INLINE_H) tree-pretty-print.h \ > gimple-pretty-print.h > tree-cfgcleanup.o : tree-cfgcleanup.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ > @@ -2646,7 +2646,7 @@ gimple-low.o : gimple-low.c $(CONFIG_H) > $(DIAGNOSTIC_H) $(GIMPLE_H) $(TREE_INLINE_H) langhooks.h \ > $(LANGHOOKS_DEF_H) $(TREE_FLOW_H) $(TIMEVAR_H) $(TM_H) coretypes.h \ > $(EXCEPT_H) $(FLAGS_H) $(RTL_H) $(FUNCTION_H) $(EXPR_H) $(TREE_PASS_H) \ > - $(HASHTAB_H) toplev.h $(DIAGNOSTIC_CORE_H) tree-iterator.h > + $(HASHTAB_H) $(DIAGNOSTIC_CORE_H) tree-iterator.h > omp-low.o : omp-low.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ > $(RTL_H) $(GIMPLE_H) $(TREE_INLINE_H) langhooks.h $(DIAGNOSTIC_CORE_H) \ > $(TREE_FLOW_H) $(TIMEVAR_H) $(FLAGS_H) $(EXPR_H) $(DIAGNOSTIC_CORE_H) \ > @@ -2732,7 +2732,7 @@ graphite-scop-detection.o: graphite-scop > graphite-scop-detection.h graphite-poly.h > graphite-sese-to-poly.o: graphite-sese-to-poly.c $(CONFIG_H) \ > $(SYSTEM_H) coretypes.h $(TM_H) \ > - $(GGC_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) toplev.h $(DIAGNOSTIC_CORE_H) \ > + $(GGC_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(DIAGNOSTIC_CORE_H) \ > $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) $(GIMPLE_H) \ > $(TREE_DATA_REF_H) tree-pass.h domwalk.h graphite.h \ > pointer-set.h value-prof.h graphite-ppl.h sese.h \ > @@ -2836,7 +2836,7 @@ opts-common.o : opts-common.c $(OPTS_H) > targhooks.o : targhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \ > $(EXPR_H) $(TM_H) $(RTL_H) $(TM_P_H) $(FUNCTION_H) output.h $(DIAGNOSTIC_CORE_H) \ > $(MACHMODE_H) $(TARGET_DEF_H) $(TARGET_H) $(GGC_H) gt-targhooks.h \ > - $(OPTABS_H) $(RECOG_H) reload.h hard-reg-set.h > + $(OPTABS_H) $(RECOG_H) reload.h hard-reg-set.h intl.h $(OPTS_H) > > bversion.h: s-bversion; @true > s-bversion: BASE-VER > @@ -2878,7 +2878,7 @@ passes.o : passes.c $(CONFIG_H) $(SYSTEM > $(PLUGIN_H) > > plugin.o : plugin.c $(PLUGIN_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h \ > - toplev.h $(DIAGNOSTIC_CORE_H) $(TREE_H) $(TREE_PASS_H) intl.h $(PLUGIN_VERSION_H) $(GGC_H) > + $(DIAGNOSTIC_CORE_H) $(TREE_H) $(TREE_PASS_H) intl.h $(PLUGIN_VERSION_H) $(GGC_H) > > main.o : main.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) toplev.h $(DIAGNOSTIC_CORE_H) > > @@ -2902,7 +2902,7 @@ rtlanal.o : rtlanal.c $(CONFIG_H) $(SYST > > varasm.o : varasm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ > $(RTL_H) $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) hard-reg-set.h $(REGS_H) \ > - output.h toplev.h $(DIAGNOSTIC_CORE_H) xcoffout.h debug.h $(GGC_H) $(TM_P_H) \ > + output.h $(DIAGNOSTIC_CORE_H) xcoffout.h debug.h $(GGC_H) $(TM_P_H) \ > $(HASHTAB_H) $(TARGET_H) langhooks.h gt-varasm.h $(BASIC_BLOCK_H) \ > $(CFGLAYOUT_H) $(CGRAPH_H) targhooks.h tree-mudflap.h \ > tree-iterator.h pointer-set.h > @@ -2983,7 +2983,7 @@ dwarf2asm.o : dwarf2asm.c $(CONFIG_H) $( > vmsdbgout.o : vmsdbgout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) version.h \ > $(FLAGS_H) $(RTL_H) output.h vmsdbg.h debug.h langhooks.h $(FUNCTION_H) $(TARGET_H) > xcoffout.o : xcoffout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ > - $(TREE_H) $(RTL_H) xcoffout.h $(FLAGS_H) toplev.h $(DIAGNOSTIC_CORE_H) output.h dbxout.h \ > + $(TREE_H) $(RTL_H) xcoffout.h $(FLAGS_H) $(DIAGNOSTIC_CORE_H) output.h dbxout.h \ > $(GGC_H) $(TARGET_H) debug.h $(GSTAB_H) xcoff.h > godump.o : godump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DIAGNOSTIC_CORE_H) \ > $(TREE_H) $(GGC_H) pointer-set.h $(OBSTACK_H) debug.h > Index: gcc/tree-cfg.c > =================================================================== > --- gcc/tree-cfg.c (revision 167307) > +++ gcc/tree-cfg.c (working copy) > @@ -38,7 +38,6 @@ along with GCC; see the file COPYING3. > #include "tree-dump.h" > #include "tree-pass.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "except.h" > #include "cfgloop.h" > #include "cfglayout.h" > Index: gcc/config/alpha/alpha.c > =================================================================== > --- gcc/config/alpha/alpha.c (revision 167307) > +++ gcc/config/alpha/alpha.c (working copy) > @@ -42,7 +42,6 @@ along with GCC; see the file COPYING3. > #include "except.h" > #include "function.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "ggc.h" > #include "integrate.h" > #include "tm_p.h" > Index: gcc/config/frv/frv.c > =================================================================== > --- gcc/config/frv/frv.c (revision 167307) > +++ gcc/config/frv/frv.c (working copy) > @@ -40,7 +40,6 @@ along with GCC; see the file COPYING3. > #include "function.h" > #include "optabs.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "basic-block.h" > #include "tm_p.h" > #include "ggc.h" > Index: gcc/config/s390/s390.c > =================================================================== > --- gcc/config/s390/s390.c (revision 167307) > +++ gcc/config/s390/s390.c (working copy) > @@ -41,7 +41,6 @@ along with GCC; see the file COPYING3. > #include "expr.h" > #include "reload.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "basic-block.h" > #include "integrate.h" > #include "ggc.h" > Index: gcc/config/m32c/m32c.c > =================================================================== > --- gcc/config/m32c/m32c.c (revision 167307) > +++ gcc/config/m32c/m32c.c (working copy) > @@ -35,7 +35,6 @@ > #include "recog.h" > #include "reload.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "obstack.h" > #include "tree.h" > #include "expr.h" > Index: gcc/config/spu/t-spu-elf > =================================================================== > --- gcc/config/spu/t-spu-elf (revision 167307) > +++ gcc/config/spu/t-spu-elf (working copy) > @@ -107,7 +107,7 @@ spu.o: $(CONFIG_H) $(SYSTEM_H) coretypes > $(RTL_H) $(REGS_H) hard-reg-set.h \ > real.h insn-config.h conditions.h insn-attr.h flags.h $(RECOG_H) \ > $(OBSTACK_H) $(TREE_H) $(EXPR_H) $(OPTABS_H) except.h function.h \ > - output.h $(BASIC_BLOCK_H) $(INTEGRATE_H) toplev.h $(GGC_H) $(HASHTAB_H) \ > + output.h $(BASIC_BLOCK_H) $(INTEGRATE_H) $(GGC_H) $(HASHTAB_H) \ > $(TM_P_H) $(TARGET_H) $(TARGET_DEF_H) langhooks.h reload.h cfglayout.h \ > $(srcdir)/config/spu/spu-protos.h \ > $(srcdir)/config/spu/spu-builtins.def > Index: gcc/config/spu/spu.c > =================================================================== > --- gcc/config/spu/spu.c (revision 167307) > +++ gcc/config/spu/spu.c (working copy) > @@ -36,7 +36,6 @@ > #include "basic-block.h" > #include "integrate.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "ggc.h" > #include "hashtab.h" > #include "tm_p.h" > Index: gcc/config/sparc/sparc.c > =================================================================== > --- gcc/config/sparc/sparc.c (revision 167307) > +++ gcc/config/sparc/sparc.c (working copy) > @@ -42,7 +42,6 @@ along with GCC; see the file COPYING3. > #include "optabs.h" > #include "recog.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "ggc.h" > #include "tm_p.h" > #include "debug.h" > Index: gcc/config/mep/mep.c > =================================================================== > --- gcc/config/mep/mep.c (revision 167307) > +++ gcc/config/mep/mep.c (working copy) > @@ -44,7 +44,6 @@ along with GCC; see the file COPYING3. > #include "tm_p.h" > #include "ggc.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "integrate.h" > #include "target.h" > #include "target-def.h" > Index: gcc/config/m32r/m32r.c > =================================================================== > --- gcc/config/m32r/m32r.c (revision 167307) > +++ gcc/config/m32r/m32r.c (working copy) > @@ -35,7 +35,6 @@ > #include "function.h" > #include "recog.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "ggc.h" > #include "integrate.h" > #include "df.h" > Index: gcc/config/sh/sh.c > =================================================================== > --- gcc/config/sh/sh.c (revision 167307) > +++ gcc/config/sh/sh.c (working copy) > @@ -38,7 +38,6 @@ along with GCC; see the file COPYING3. > #include "output.h" > #include "insn-attr.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "recog.h" > #include "integrate.h" > #include "dwarf2.h" > Index: gcc/config/pdp11/pdp11.c > =================================================================== > --- gcc/config/pdp11/pdp11.c (revision 167307) > +++ gcc/config/pdp11/pdp11.c (working copy) > @@ -36,7 +36,6 @@ along with GCC; see the file COPYING3. > #include "tree.h" > #include "expr.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "tm_p.h" > #include "target.h" > #include "target-def.h" > Index: gcc/config/microblaze/microblaze.c > =================================================================== > --- gcc/config/microblaze/microblaze.c (revision 167307) > +++ gcc/config/microblaze/microblaze.c (working copy) > @@ -33,7 +33,6 @@ > #include "insn-attr.h" > #include "integrate.h" > #include "recog.h" > -#include "toplev.h" > #include "tree.h" > #include "function.h" > #include "expr.h" > Index: gcc/config/avr/avr.c > =================================================================== > --- gcc/config/avr/avr.c (revision 167307) > +++ gcc/config/avr/avr.c (working copy) > @@ -35,7 +35,6 @@ > #include "output.h" > #include "expr.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "obstack.h" > #include "function.h" > #include "recog.h" > Index: gcc/config/crx/crx.c > =================================================================== > --- gcc/config/crx/crx.c (revision 167307) > +++ gcc/config/crx/crx.c (working copy) > @@ -44,7 +44,6 @@ > #include "expr.h" > #include "optabs.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "basic-block.h" > #include "df.h" > #include "target.h" > Index: gcc/config/xtensa/xtensa.c > =================================================================== > --- gcc/config/xtensa/xtensa.c (revision 167307) > +++ gcc/config/xtensa/xtensa.c (working copy) > @@ -41,7 +41,6 @@ along with GCC; see the file COPYING3. > #include "tm_p.h" > #include "function.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "optabs.h" > #include "libfuncs.h" > #include "ggc.h" > Index: gcc/config/stormy16/stormy16.c > =================================================================== > --- gcc/config/stormy16/stormy16.c (revision 167307) > +++ gcc/config/stormy16/stormy16.c (working copy) > @@ -34,7 +34,6 @@ > #include "flags.h" > #include "recog.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "obstack.h" > #include "tree.h" > #include "expr.h" > Index: gcc/config/fr30/fr30.c > =================================================================== > --- gcc/config/fr30/fr30.c (revision 167307) > +++ gcc/config/fr30/fr30.c (working copy) > @@ -41,7 +41,6 @@ > #include "function.h" > #include "df.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "tm_p.h" > #include "target.h" > #include "target-def.h" > Index: gcc/config/lm32/lm32.c > =================================================================== > --- gcc/config/lm32/lm32.c (revision 167307) > +++ gcc/config/lm32/lm32.c (working copy) > @@ -41,7 +41,6 @@ > #include "tm_p.h" > #include "function.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "optabs.h" > #include "libfuncs.h" > #include "ggc.h" > Index: gcc/config/moxie/moxie.c > =================================================================== > --- gcc/config/moxie/moxie.c (revision 167307) > +++ gcc/config/moxie/moxie.c (working copy) > @@ -34,7 +34,6 @@ > #include "recog.h" > #include "reload.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "obstack.h" > #include "tree.h" > #include "expr.h" > Index: gcc/config/m68hc11/m68hc11.c > =================================================================== > --- gcc/config/m68hc11/m68hc11.c (revision 167307) > +++ gcc/config/m68hc11/m68hc11.c (working copy) > @@ -51,7 +51,6 @@ Note: > #include "expr.h" > #include "libfuncs.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "basic-block.h" > #include "function.h" > #include "ggc.h" > Index: gcc/config/cris/cris.c > =================================================================== > --- gcc/config/cris/cris.c (revision 167307) > +++ gcc/config/cris/cris.c (working copy) > @@ -35,7 +35,6 @@ along with GCC; see the file COPYING3. > #include "except.h" > #include "function.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "recog.h" > #include "reload.h" > #include "tm_p.h" > Index: gcc/config/iq2000/iq2000.c > =================================================================== > --- gcc/config/iq2000/iq2000.c (revision 167307) > +++ gcc/config/iq2000/iq2000.c (working copy) > @@ -37,7 +37,6 @@ along with GCC; see the file COPYING3. > #include "libfuncs.h" > #include "recog.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "reload.h" > #include "ggc.h" > #include "tm_p.h" > Index: gcc/config/mn10300/mn10300.c > =================================================================== > --- gcc/config/mn10300/mn10300.c (revision 167307) > +++ gcc/config/mn10300/mn10300.c (working copy) > @@ -39,7 +39,6 @@ > #include "function.h" > #include "obstack.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "tm_p.h" > #include "target.h" > #include "target-def.h" > Index: gcc/config/ia64/ia64.c > =================================================================== > --- gcc/config/ia64/ia64.c (revision 167307) > +++ gcc/config/ia64/ia64.c (working copy) > @@ -43,7 +43,6 @@ along with GCC; see the file COPYING3. > #include "basic-block.h" > #include "libfuncs.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "sched-int.h" > #include "timevar.h" > #include "target.h" > Index: gcc/config/m68k/m68k.c > =================================================================== > --- gcc/config/m68k/m68k.c (revision 167307) > +++ gcc/config/m68k/m68k.c (working copy) > @@ -34,7 +34,6 @@ along with GCC; see the file COPYING3. > #include "insn-attr.h" > #include "recog.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "expr.h" > #include "reload.h" > #include "tm_p.h" > Index: gcc/config/picochip/picochip.c > =================================================================== > --- gcc/config/picochip/picochip.c (revision 167307) > +++ gcc/config/picochip/picochip.c (working copy) > @@ -42,7 +42,6 @@ along with GCC; see the file COPYING3. > #include "basic-block.h" > #include "integrate.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "ggc.h" > #include "hashtab.h" > #include "tm_p.h" > Index: gcc/config/arc/arc.c > =================================================================== > --- gcc/config/arc/arc.c (revision 167307) > +++ gcc/config/arc/arc.c (working copy) > @@ -37,7 +37,6 @@ along with GCC; see the file COPYING3. > #include "expr.h" > #include "recog.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "df.h" > #include "tm_p.h" > #include "target.h" > Index: gcc/config/mcore/mcore.c > =================================================================== > --- gcc/config/mcore/mcore.c (revision 167307) > +++ gcc/config/mcore/mcore.c (working copy) > @@ -41,7 +41,6 @@ > #include "function.h" > #include "ggc.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "target.h" > #include "target-def.h" > #include "df.h" > Index: gcc/config/score/score.c > =================================================================== > --- gcc/config/score/score.c (revision 167307) > +++ gcc/config/score/score.c (working copy) > @@ -30,7 +30,6 @@ > #include "insn-attr.h" > #include "recog.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "output.h" > #include "tree.h" > #include "function.h" > Index: gcc/config/arm/arm.c > =================================================================== > --- gcc/config/arm/arm.c (revision 167307) > +++ gcc/config/arm/arm.c (working copy) > @@ -41,7 +41,6 @@ > #include "expr.h" > #include "optabs.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "recog.h" > #include "cgraph.h" > #include "ggc.h" > Index: gcc/config/arm/t-arm > =================================================================== > --- gcc/config/arm/t-arm (revision 167307) > +++ gcc/config/arm/t-arm (working copy) > @@ -49,7 +49,7 @@ arm.o: $(CONFIG_H) $(SYSTEM_H) coretypes > $(RTL_H) $(TREE_H) $(OBSTACK_H) $(REGS_H) hard-reg-set.h \ > insn-config.h conditions.h output.h \ > $(INSN_ATTR_H) $(FLAGS_H) reload.h $(FUNCTION_H) \ > - $(EXPR_H) $(OPTABS_H) toplev.h $(RECOG_H) $(CGRAPH_H) \ > + $(EXPR_H) $(OPTABS_H) $(RECOG_H) $(CGRAPH_H) \ > $(GGC_H) except.h $(C_PRAGMA_H) $(INTEGRATE_H) $(TM_P_H) \ > $(TARGET_H) $(TARGET_DEF_H) debug.h langhooks.h $(DF_H) \ > intl.h libfuncs.h $(PARAMS_H) > Index: gcc/config/pa/pa.c > =================================================================== > --- gcc/config/pa/pa.c (revision 167307) > +++ gcc/config/pa/pa.c (working copy) > @@ -40,7 +40,6 @@ along with GCC; see the file COPYING3. > #include "integrate.h" > #include "function.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "ggc.h" > #include "recog.h" > #include "predict.h" > Index: gcc/config/mips/mips.c > =================================================================== > --- gcc/config/mips/mips.c (revision 167307) > +++ gcc/config/mips/mips.c (working copy) > @@ -34,7 +34,6 @@ along with GCC; see the file COPYING3. > #include "conditions.h" > #include "insn-attr.h" > #include "recog.h" > -#include "toplev.h" > #include "output.h" > #include "tree.h" > #include "function.h" > Index: gcc/config/vax/vax.c > =================================================================== > --- gcc/config/vax/vax.c (revision 167307) > +++ gcc/config/vax/vax.c (working copy) > @@ -39,7 +39,6 @@ along with GCC; see the file COPYING3. > #include "flags.h" > #include "debug.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "tm-preds.h" > #include "tm-constrs.h" > #include "tm_p.h" > Index: gcc/config/v850/v850.c > =================================================================== > --- gcc/config/v850/v850.c (revision 167307) > +++ gcc/config/v850/v850.c (working copy) > @@ -36,7 +36,6 @@ > #include "expr.h" > #include "function.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "ggc.h" > #include "integrate.h" > #include "tm_p.h" > Index: gcc/config/h8300/h8300.c > =================================================================== > --- gcc/config/h8300/h8300.c (revision 167307) > +++ gcc/config/h8300/h8300.c (working copy) > @@ -39,7 +39,6 @@ along with GCC; see the file COPYING3. > #include "function.h" > #include "optabs.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "c-family/c-pragma.h" /* ??? */ > #include "tm_p.h" > #include "ggc.h" > Index: gcc/config/mmix/mmix.c > =================================================================== > --- gcc/config/mmix/mmix.c (revision 167307) > +++ gcc/config/mmix/mmix.c (working copy) > @@ -36,7 +36,6 @@ along with GCC; see the file COPYING3. > #include "function.h" > #include "expr.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "recog.h" > #include "ggc.h" > #include "dwarf2.h" > Index: gcc/config/bfin/bfin.c > =================================================================== > --- gcc/config/bfin/bfin.c (revision 167307) > +++ gcc/config/bfin/bfin.c (working copy) > @@ -41,7 +41,6 @@ > #include "target-def.h" > #include "expr.h" > #include "diagnostic-core.h" > -#include "toplev.h" > #include "recog.h" > #include "optabs.h" > #include "ggc.h" > > -- > Joseph S. Myers > joseph@codesourcery.com >
Index: gcc/targhooks.c =================================================================== --- gcc/targhooks.c (revision 167307) +++ gcc/targhooks.c (working copy) @@ -67,6 +67,8 @@ along with GCC; see the file COPYING3. #include "reload.h" #include "optabs.h" #include "recog.h" +#include "intl.h" +#include "opts.h" bool @@ -1356,6 +1358,115 @@ default_get_reg_raw_mode(int regno) return reg_raw_mode[regno]; } +/* Return true if the state of option OPTION should be stored in PCH files + and checked by default_pch_valid_p. Store the option's current state + in STATE if so. */ + +static inline bool +option_affects_pch_p (int option, struct cl_option_state *state) +{ + if ((cl_options[option].flags & CL_TARGET) == 0) + return false; + if (option_flag_var (option, &global_options) == &target_flags) + if (targetm.check_pch_target_flags) + return false; + return get_option_state (&global_options, option, state); +} + +/* Default version of get_pch_validity. + By default, every flag difference is fatal; that will be mostly right for + most targets, but completely right for very few. */ + +void * +default_get_pch_validity (size_t *sz) +{ + struct cl_option_state state; + size_t i; + char *result, *r; + + *sz = 2; + if (targetm.check_pch_target_flags) + *sz += sizeof (target_flags); + for (i = 0; i < cl_options_count; i++) + if (option_affects_pch_p (i, &state)) + *sz += state.size; + + result = r = XNEWVEC (char, *sz); + r[0] = flag_pic; + r[1] = flag_pie; + r += 2; + if (targetm.check_pch_target_flags) + { + memcpy (r, &target_flags, sizeof (target_flags)); + r += sizeof (target_flags); + } + + for (i = 0; i < cl_options_count; i++) + if (option_affects_pch_p (i, &state)) + { + memcpy (r, state.data, state.size); + r += state.size; + } + + return result; +} + +/* Return a message which says that a PCH file was created with a different + setting of OPTION. */ + +static const char * +pch_option_mismatch (const char *option) +{ + char *r; + + asprintf (&r, _("created and used with differing settings of '%s'"), option); + if (r == NULL) + return _("out of memory"); + return r; +} + +/* Default version of pch_valid_p. */ + +const char * +default_pch_valid_p (const void *data_p, size_t len) +{ + struct cl_option_state state; + const char *data = (const char *)data_p; + size_t i; + + /* -fpic and -fpie also usually make a PCH invalid. */ + if (data[0] != flag_pic) + return _("created and used with different settings of -fpic"); + if (data[1] != flag_pie) + return _("created and used with different settings of -fpie"); + data += 2; + + /* Check target_flags. */ + if (targetm.check_pch_target_flags) + { + int tf; + const char *r; + + memcpy (&tf, data, sizeof (target_flags)); + data += sizeof (target_flags); + len -= sizeof (target_flags); + r = targetm.check_pch_target_flags (tf); + if (r != NULL) + return r; + } + + for (i = 0; i < cl_options_count; i++) + if (option_affects_pch_p (i, &state)) + { + if (memcmp (data, state.data, state.size) != 0) + return pch_option_mismatch (cl_options[i].opt_text); + data += state.size; + len -= state.size; + } + + return NULL; +} + const struct default_options empty_optimization_table[] = { { OPT_LEVELS_NONE, 0, NULL, 0 } Index: gcc/tree-dump.c =================================================================== --- gcc/tree-dump.c (revision 167307) +++ gcc/tree-dump.c (working copy) @@ -32,6 +32,11 @@ along with GCC; see the file COPYING3. #include "langhooks.h" #include "tree-iterator.h" +/* If non-NULL, return one past-the-end of the matching SUBPART of + the WHOLE string. */ +#define skip_leading_substring(whole, part) \ + (strncmp (whole, part, strlen (part)) ? NULL : whole + strlen (part)) + static unsigned int queue (dump_info_p, const_tree, int); static void dump_index (dump_info_p, unsigned int); static void dequeue_and_dump (dump_info_p); Index: gcc/targhooks.h =================================================================== --- gcc/targhooks.h (revision 167307) +++ gcc/targhooks.h (working copy) @@ -176,3 +176,6 @@ extern section * default_function_sectio extern enum machine_mode default_get_reg_raw_mode(int); extern const struct default_options empty_optimization_table[]; + +extern void *default_get_pch_validity (size_t *); +extern const char *default_pch_valid_p (const void *, size_t); Index: gcc/java/jcf-parse.c =================================================================== --- gcc/java/jcf-parse.c (revision 167307) +++ gcc/java/jcf-parse.c (working copy) @@ -35,7 +35,6 @@ The Free Software Foundation is independ #include "javaop.h" #include "java-tree.h" #include "diagnostic-core.h" -#include "toplev.h" #include "parse.h" #include "ggc.h" #include "debug.h" Index: gcc/java/Make-lang.in =================================================================== --- gcc/java/Make-lang.in (revision 167307) +++ gcc/java/Make-lang.in (working copy) @@ -295,7 +295,7 @@ java/expr.o: java/expr.c $(CONFIG_H) $(J java/jcf-depend.o: java/jcf-depend.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ java/jcf.h java/jcf-parse.o: java/jcf-parse.c $(CONFIG_H) $(JAVA_TREE_H) $(FLAGS_H) \ - input.h java/java-except.h $(SYSTEM_H) coretypes.h toplev.h \ + input.h java/java-except.h $(SYSTEM_H) coretypes.h \ java/parse.h $(GGC_H) debug.h $(REAL_H) gt-java-jcf-parse.h \ java/jcf-reader.c java/zipfile.h java/jcf.h $(BITMAP_H) java/jvgenmain.o: java/jvgenmain.c $(CONFIG_H) $(JAVA_TREE_H) $(SYSTEM_H) \ Index: gcc/tree.c =================================================================== --- gcc/tree.c (revision 167307) +++ gcc/tree.c (working copy) @@ -11005,4 +11005,109 @@ typedef_variant_p (tree type) return is_typedef_decl (TYPE_NAME (type)); } +/* Warn about a use of an identifier which was marked deprecated. */ +void +warn_deprecated_use (tree node, tree attr) +{ + const char *msg; + + if (node == 0 || !warn_deprecated_decl) + return; + + if (!attr) + { + if (DECL_P (node)) + attr = DECL_ATTRIBUTES (node); + else if (TYPE_P (node)) + { + tree decl = TYPE_STUB_DECL (node); + if (decl) + attr = lookup_attribute ("deprecated", + TYPE_ATTRIBUTES (TREE_TYPE (decl))); + } + } + + if (attr) + attr = lookup_attribute ("deprecated", attr); + + if (attr) + msg = TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (attr))); + else + msg = NULL; + + if (DECL_P (node)) + { + expanded_location xloc = expand_location (DECL_SOURCE_LOCATION (node)); + if (msg) + warning (OPT_Wdeprecated_declarations, + "%qD is deprecated (declared at %s:%d): %s", + node, xloc.file, xloc.line, msg); + else + warning (OPT_Wdeprecated_declarations, + "%qD is deprecated (declared at %s:%d)", + node, xloc.file, xloc.line); + } + else if (TYPE_P (node)) + { + tree what = NULL_TREE; + tree decl = TYPE_STUB_DECL (node); + + if (TYPE_NAME (node)) + { + if (TREE_CODE (TYPE_NAME (node)) == IDENTIFIER_NODE) + what = TYPE_NAME (node); + else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL + && DECL_NAME (TYPE_NAME (node))) + what = DECL_NAME (TYPE_NAME (node)); + } + + if (decl) + { + expanded_location xloc + = expand_location (DECL_SOURCE_LOCATION (decl)); + if (what) + { + if (msg) + warning (OPT_Wdeprecated_declarations, + "%qE is deprecated (declared at %s:%d): %s", + what, xloc.file, xloc.line, msg); + else + warning (OPT_Wdeprecated_declarations, + "%qE is deprecated (declared at %s:%d)", what, + xloc.file, xloc.line); + } + else + { + if (msg) + warning (OPT_Wdeprecated_declarations, + "type is deprecated (declared at %s:%d): %s", + xloc.file, xloc.line, msg); + else + warning (OPT_Wdeprecated_declarations, + "type is deprecated (declared at %s:%d)", + xloc.file, xloc.line); + } + } + else + { + if (what) + { + if (msg) + warning (OPT_Wdeprecated_declarations, "%qE is deprecated: %s", + what, msg); + else + warning (OPT_Wdeprecated_declarations, "%qE is deprecated", what); + } + else + { + if (msg) + warning (OPT_Wdeprecated_declarations, "type is deprecated: %s", + msg); + else + warning (OPT_Wdeprecated_declarations, "type is deprecated"); + } + } + } +} + #include "gt-tree.h" Index: gcc/tree.h =================================================================== --- gcc/tree.h (revision 167307) +++ gcc/tree.h (working copy) @@ -4959,6 +4959,7 @@ extern tree tree_strip_nop_conversions ( extern tree tree_strip_sign_nop_conversions (tree); extern tree lhd_gcc_personality (void); extern void assign_assembler_name_if_neeeded (tree); +extern void warn_deprecated_use (tree, tree); /* In cgraph.c */ Index: gcc/final.c =================================================================== --- gcc/final.c (revision 167307) +++ gcc/final.c (working copy) @@ -3620,6 +3620,32 @@ output_addr_const (FILE *file, rtx x) } } +/* Output a quoted string. */ + +void +output_quoted_string (FILE *asm_file, const char *string) +{ +#ifdef OUTPUT_QUOTED_STRING + OUTPUT_QUOTED_STRING (asm_file, string); +#else + char c; + + putc ('\"', asm_file); + while ((c = *string++) != 0) + { + if (ISPRINT (c)) + { + if (c == '\"' || c == '\\') + putc ('\\', asm_file); + putc (c, asm_file); + } + else + fprintf (asm_file, "\\%03o", (unsigned char) c); + } + putc ('\"', asm_file); +#endif +} + /* A poor man's fprintf, with the added features of %I, %R, %L, and %U. %R prints the value of REGISTER_PREFIX. %L prints the value of LOCAL_LABEL_PREFIX. Index: gcc/toplev.c =================================================================== --- gcc/toplev.c (revision 167307) +++ gcc/toplev.c (working copy) @@ -116,18 +116,6 @@ static bool no_backend; struct cl_decoded_option *save_decoded_options; unsigned int save_decoded_options_count; -/* Name of top-level original source file (what was input to cpp). - This comes from the #-command at the beginning of the actual input. - If there isn't any there, then this is the cc1 input file name. */ - -const char *main_input_filename; - -/* Pointer to base name in main_input_filename, with directories and a - single final extension removed, and the length of this base - name. */ -const char *main_input_basename; -int main_input_baselength; - /* Used to enable -fvar-tracking, -fweb and -frename-registers according to optimize in process_options (). */ #define AUTODETECT_VALUE 2 @@ -374,32 +362,6 @@ crash_signal (int signo) internal_error ("%s", strsignal (signo)); } -/* Output a quoted string. */ - -void -output_quoted_string (FILE *asm_file, const char *string) -{ -#ifdef OUTPUT_QUOTED_STRING - OUTPUT_QUOTED_STRING (asm_file, string); -#else - char c; - - putc ('\"', asm_file); - while ((c = *string++) != 0) - { - if (ISPRINT (c)) - { - if (c == '\"' || c == '\\') - putc ('\\', asm_file); - putc (c, asm_file); - } - else - fprintf (asm_file, "\\%03o", (unsigned char) c); - } - putc ('\"', asm_file); -#endif -} - /* A subroutine of wrapup_global_declarations. We've come to the end of the compilation unit. All deferred variables should be undeferred, and all incomplete decls should be finalized. */ @@ -597,111 +559,6 @@ emit_debug_global_declarations (tree *ve timevar_pop (TV_SYMOUT); } -/* Warn about a use of an identifier which was marked deprecated. */ -void -warn_deprecated_use (tree node, tree attr) -{ - const char *msg; - - if (node == 0 || !warn_deprecated_decl) - return; - - if (!attr) - { - if (DECL_P (node)) - attr = DECL_ATTRIBUTES (node); - else if (TYPE_P (node)) - { - tree decl = TYPE_STUB_DECL (node); - if (decl) - attr = lookup_attribute ("deprecated", - TYPE_ATTRIBUTES (TREE_TYPE (decl))); - } - } - - if (attr) - attr = lookup_attribute ("deprecated", attr); - - if (attr) - msg = TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (attr))); - else - msg = NULL; - - if (DECL_P (node)) - { - expanded_location xloc = expand_location (DECL_SOURCE_LOCATION (node)); - if (msg) - warning (OPT_Wdeprecated_declarations, - "%qD is deprecated (declared at %s:%d): %s", - node, xloc.file, xloc.line, msg); - else - warning (OPT_Wdeprecated_declarations, - "%qD is deprecated (declared at %s:%d)", - node, xloc.file, xloc.line); - } - else if (TYPE_P (node)) - { - tree what = NULL_TREE; - tree decl = TYPE_STUB_DECL (node); - - if (TYPE_NAME (node)) - { - if (TREE_CODE (TYPE_NAME (node)) == IDENTIFIER_NODE) - what = TYPE_NAME (node); - else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL - && DECL_NAME (TYPE_NAME (node))) - what = DECL_NAME (TYPE_NAME (node)); - } - - if (decl) - { - expanded_location xloc - = expand_location (DECL_SOURCE_LOCATION (decl)); - if (what) - { - if (msg) - warning (OPT_Wdeprecated_declarations, - "%qE is deprecated (declared at %s:%d): %s", - what, xloc.file, xloc.line, msg); - else - warning (OPT_Wdeprecated_declarations, - "%qE is deprecated (declared at %s:%d)", what, - xloc.file, xloc.line); - } - else - { - if (msg) - warning (OPT_Wdeprecated_declarations, - "type is deprecated (declared at %s:%d): %s", - xloc.file, xloc.line, msg); - else - warning (OPT_Wdeprecated_declarations, - "type is deprecated (declared at %s:%d)", - xloc.file, xloc.line); - } - } - else - { - if (what) - { - if (msg) - warning (OPT_Wdeprecated_declarations, "%qE is deprecated: %s", - what, msg); - else - warning (OPT_Wdeprecated_declarations, "%qE is deprecated", what); - } - else - { - if (msg) - warning (OPT_Wdeprecated_declarations, "type is deprecated: %s", - msg); - else - warning (OPT_Wdeprecated_declarations, "type is deprecated"); - } - } - } -} - /* Compile an entire translation unit. Write a file of assembly output and various debugging dumps. */ @@ -1108,115 +965,6 @@ init_asm_output (const char *name) } } -/* Return true if the state of option OPTION should be stored in PCH files - and checked by default_pch_valid_p. Store the option's current state - in STATE if so. */ - -static inline bool -option_affects_pch_p (int option, struct cl_option_state *state) -{ - if ((cl_options[option].flags & CL_TARGET) == 0) - return false; - if (option_flag_var (option, &global_options) == &target_flags) - if (targetm.check_pch_target_flags) - return false; - return get_option_state (&global_options, option, state); -} - -/* Default version of get_pch_validity. - By default, every flag difference is fatal; that will be mostly right for - most targets, but completely right for very few. */ - -void * -default_get_pch_validity (size_t *sz) -{ - struct cl_option_state state; - size_t i; - char *result, *r; - - *sz = 2; - if (targetm.check_pch_target_flags) - *sz += sizeof (target_flags); - for (i = 0; i < cl_options_count; i++) - if (option_affects_pch_p (i, &state)) - *sz += state.size; - - result = r = XNEWVEC (char, *sz); - r[0] = flag_pic; - r[1] = flag_pie; - r += 2; - if (targetm.check_pch_target_flags) - { - memcpy (r, &target_flags, sizeof (target_flags)); - r += sizeof (target_flags); - } - - for (i = 0; i < cl_options_count; i++) - if (option_affects_pch_p (i, &state)) - { - memcpy (r, state.data, state.size); - r += state.size; - } - - return result; -} - -/* Return a message which says that a PCH file was created with a different - setting of OPTION. */ - -static const char * -pch_option_mismatch (const char *option) -{ - char *r; - - asprintf (&r, _("created and used with differing settings of '%s'"), option); - if (r == NULL) - return _("out of memory"); - return r; -} - -/* Default version of pch_valid_p. */ - -const char * -default_pch_valid_p (const void *data_p, size_t len) -{ - struct cl_option_state state; - const char *data = (const char *)data_p; - size_t i; - - /* -fpic and -fpie also usually make a PCH invalid. */ - if (data[0] != flag_pic) - return _("created and used with different settings of -fpic"); - if (data[1] != flag_pie) - return _("created and used with different settings of -fpie"); - data += 2; - - /* Check target_flags. */ - if (targetm.check_pch_target_flags) - { - int tf; - const char *r; - - memcpy (&tf, data, sizeof (target_flags)); - data += sizeof (target_flags); - len -= sizeof (target_flags); - r = targetm.check_pch_target_flags (tf); - if (r != NULL) - return r; - } - - for (i = 0; i < cl_options_count; i++) - if (option_affects_pch_p (i, &state)) - { - if (memcmp (data, state.data, state.size) != 0) - return pch_option_mismatch (cl_options[i].opt_text); - data += state.size; - len -= state.size; - } - - return NULL; -} - /* Default tree printer. Handles declarations only. */ bool default_tree_printer (pretty_printer *pp, text_info *text, const char *spec, Index: gcc/toplev.h =================================================================== --- gcc/toplev.h (revision 167307) +++ gcc/toplev.h (working copy) @@ -22,11 +22,6 @@ along with GCC; see the file COPYING3. #ifndef GCC_TOPLEV_H #define GCC_TOPLEV_H -/* If non-NULL, return one past-the-end of the matching SUBPART of - the WHOLE string. */ -#define skip_leading_substring(whole, part) \ - (strncmp (whole, part, strlen (part)) ? NULL : whole + strlen (part)) - /* Decoded options, and number of such options. */ extern struct cl_decoded_option *save_decoded_options; extern unsigned int save_decoded_options_count; @@ -46,12 +41,6 @@ extern void init_eh (void); extern void announce_function (tree); -extern void warn_deprecated_use (tree, tree); - -#ifdef BUFSIZ -extern void output_quoted_string (FILE *, const char *); -#endif - extern void wrapup_global_declaration_1 (tree); extern bool wrapup_global_declaration_2 (tree); extern bool wrapup_global_declarations (tree *, int); @@ -67,11 +56,6 @@ extern void target_reinit (void); /* A unique local time stamp, might be zero if none is available. */ extern unsigned local_tick; -/* Top-level source file. */ -extern const char *main_input_filename; -extern const char *main_input_basename; -extern int main_input_baselength; - /* True if the user has tagged the function with the 'section' attribute. */ @@ -80,10 +64,7 @@ extern bool user_defined_section_attribu /* See toplev.c. */ extern int flag_rerun_cse_after_global_opts; -/* Things to do with target switches. */ extern void print_version (FILE *, const char *); -extern void * default_get_pch_validity (size_t *); -extern const char * default_pch_valid_p (const void *, size_t); /* The hashtable, so that the C front ends can pass it to cpplib. */ extern struct ht *ident_hash; Index: gcc/cp/typeck.c =================================================================== --- gcc/cp/typeck.c (revision 167307) +++ gcc/cp/typeck.c (working copy) @@ -34,7 +34,6 @@ along with GCC; see the file COPYING3. #include "cp-tree.h" #include "flags.h" #include "output.h" -#include "toplev.h" #include "diagnostic.h" #include "intl.h" #include "target.h" Index: gcc/cp/Make-lang.in =================================================================== --- gcc/cp/Make-lang.in (revision 167307) +++ gcc/cp/Make-lang.in (working copy) @@ -247,7 +247,7 @@ CXX_TREE_H = $(TREE_H) cp/name-lookup.h CXX_PRETTY_PRINT_H = cp/cxx-pretty-print.h $(C_PRETTY_PRINT_H) cp/lex.o: cp/lex.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) \ - $(C_PRAGMA_H) toplev.h output.h input.h cp/operators.def $(TM_P_H) + $(C_PRAGMA_H) output.h input.h cp/operators.def $(TM_P_H) cp/cp-lang.o: cp/cp-lang.c $(CXX_TREE_H) $(TM_H) debug.h langhooks.h \ $(LANGHOOKS_DEF_H) $(C_COMMON_H) gtype-cp.h gt-cp-cp-lang.h \ cp/cp-objcp-common.h $(EXPR_H) $(TARGET_H) @@ -261,14 +261,14 @@ cp/decl2.o: cp/decl2.c $(CXX_TREE_H) $(T $(C_PRAGMA_H) $(TREE_DUMP_H) intl.h $(TARGET_H) $(GIMPLE_H) $(POINTER_SET_H) \ $(SPLAY_TREE_H) c-family/c-ada-spec.h cp/cp-objcp-common.o : cp/cp-objcp-common.c $(CONFIG_H) $(SYSTEM_H) \ - coretypes.h $(TM_H) $(TREE_H) $(CXX_TREE_H) $(C_COMMON_H) toplev.h \ + coretypes.h $(TM_H) $(TREE_H) $(CXX_TREE_H) $(C_COMMON_H) \ langhooks.h $(LANGHOOKS_DEF_H) $(DIAGNOSTIC_H) debug.h \ $(CXX_PRETTY_PRINT_H) cp/cp-objcp-common.h gt-cp-cp-objcp-common.h cp/typeck2.o: cp/typeck2.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) output.h \ $(TM_P_H) $(DIAGNOSTIC_CORE_H) gt-cp-typeck2.h $(REAL_H) intl.h cp/typeck.o: cp/typeck.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) \ toplev.h $(DIAGNOSTIC_H) convert.h $(C_COMMON_H) $(TARGET_H) \ - output.h toplev.h + output.h cp/class.o: cp/class.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) toplev.h \ $(TARGET_H) convert.h $(CGRAPH_H) $(TREE_DUMP_H) gt-cp-class.h \ $(SPLAY_TREE_H) Index: gcc/cp/cp-objcp-common.c =================================================================== --- gcc/cp/cp-objcp-common.c (revision 167307) +++ gcc/cp/cp-objcp-common.c (working copy) @@ -25,7 +25,6 @@ along with GCC; see the file COPYING3. #include "tree.h" #include "cp-tree.h" #include "c-family/c-common.h" -#include "toplev.h" #include "langhooks.h" #include "langhooks-def.h" #include "diagnostic.h" Index: gcc/cp/lex.c =================================================================== --- gcc/cp/lex.c (revision 167307) +++ gcc/cp/lex.c (working copy) @@ -33,7 +33,6 @@ along with GCC; see the file COPYING3. #include "cpplib.h" #include "flags.h" #include "c-family/c-pragma.h" -#include "toplev.h" #include "output.h" #include "tm_p.h" #include "timevar.h" Index: gcc/xcoffout.c =================================================================== --- gcc/xcoffout.c (revision 167307) +++ gcc/xcoffout.c (working copy) @@ -31,7 +31,6 @@ along with GCC; see the file COPYING3. #include "rtl.h" #include "flags.h" #include "diagnostic-core.h" -#include "toplev.h" #include "output.h" #include "ggc.h" #include "target.h" Index: gcc/gimple-low.c =================================================================== --- gcc/gimple-low.c (revision 167307) +++ gcc/gimple-low.c (working copy) @@ -31,7 +31,6 @@ along with GCC; see the file COPYING3. #include "flags.h" #include "function.h" #include "diagnostic-core.h" -#include "toplev.h" #include "tree-pass.h" /* The differences between High GIMPLE and Low GIMPLE are the Index: gcc/c-typeck.c =================================================================== --- gcc/c-typeck.c (revision 167307) +++ gcc/c-typeck.c (working copy) @@ -35,7 +35,6 @@ along with GCC; see the file COPYING3. #include "c-lang.h" #include "flags.h" #include "output.h" -#include "toplev.h" #include "intl.h" #include "target.h" #include "tree-iterator.h" Index: gcc/common.opt =================================================================== --- gcc/common.opt (revision 167307) +++ gcc/common.opt (working copy) @@ -157,6 +157,22 @@ int flag_print_asm_name Variable enum graph_dump_types graph_dump_format = no_graph +; Name of top-level original source file (what was input to cpp). +; This comes from the #-command at the beginning of the actual input. +; If there isn't any there, then this is the cc1 input file name. +Variable +const char *main_input_filename + +; Pointer to base name in main_input_filename, with directories and a +; single final extension removed, and the length of this base +; name. + +Variable +const char *main_input_basename + +Variable +int main_input_baselength + ; Which options have been printed by --help. Variable char *help_printed Index: gcc/varasm.c =================================================================== --- gcc/varasm.c (revision 167307) +++ gcc/varasm.c (working copy) @@ -40,7 +40,6 @@ along with GCC; see the file COPYING3. #include "regs.h" #include "output.h" #include "diagnostic-core.h" -#include "toplev.h" #include "hashtab.h" #include "ggc.h" #include "langhooks.h" Index: gcc/tree-inline.c =================================================================== --- gcc/tree-inline.c (revision 167307) +++ gcc/tree-inline.c (working copy) @@ -23,7 +23,6 @@ along with GCC; see the file COPYING3. #include "system.h" #include "coretypes.h" #include "tm.h" -#include "toplev.h" /* floor_log2 */ #include "diagnostic-core.h" #include "tree.h" #include "tree-inline.h" Index: gcc/graphite-sese-to-poly.c =================================================================== --- gcc/graphite-sese-to-poly.c (revision 167307) +++ gcc/graphite-sese-to-poly.c (working copy) @@ -28,7 +28,6 @@ along with GCC; see the file COPYING3. #include "basic-block.h" #include "diagnostic.h" #include "tree-flow.h" -#include "toplev.h" #include "tree-dump.h" #include "timevar.h" #include "cfgloop.h" Index: gcc/output.h =================================================================== --- gcc/output.h (revision 167307) +++ gcc/output.h (working copy) @@ -298,6 +298,8 @@ extern void output_shared_constant_pool extern void output_object_blocks (void); +extern void output_quoted_string (FILE *, const char *); + /* Whether a constructor CTOR is a valid static constant initializer if all its elements are. This used to be internal to initializer_constant_valid_p and has been exposed to let other functions like categorize_ctor_elements Index: gcc/plugin.c =================================================================== --- gcc/plugin.c (revision 167307) +++ gcc/plugin.c (working copy) @@ -33,7 +33,6 @@ along with GCC; see the file COPYING3. #include "coretypes.h" #include "diagnostic-core.h" -#include "toplev.h" #include "tree.h" #include "tree-pass.h" #include "intl.h" Index: gcc/opts-global.c =================================================================== --- gcc/opts-global.c (revision 167307) +++ gcc/opts-global.c (working copy) @@ -229,11 +229,12 @@ read_cmdline_options (struct gcc_options gcc_assert (opts == &global_options); gcc_assert (opts_set == &global_options_set); - if (main_input_filename == NULL) + if (opts->x_main_input_filename == NULL) { - main_input_filename = decoded_options[i].arg; - main_input_baselength - = base_of_path (main_input_filename, &main_input_basename); + opts->x_main_input_filename = decoded_options[i].arg; + opts->x_main_input_baselength + = base_of_path (opts->x_main_input_filename, + &opts->x_main_input_basename); } add_input_filename (decoded_options[i].arg); continue; Index: gcc/Makefile.in =================================================================== --- gcc/Makefile.in (revision 167307) +++ gcc/Makefile.in (working copy) @@ -2050,7 +2050,7 @@ c-parser.o : c-parser.c $(CONFIG_H) $(SY c-typeck.o : c-typeck.c c-lang.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(TREE_H) $(C_TREE_H) $(TARGET_H) $(FLAGS_H) intl.h output.h $(EXPR_H) \ - toplev.h langhooks.h tree-iterator.h $(BITMAP_H) $(GIMPLE_H) + langhooks.h tree-iterator.h $(BITMAP_H) $(GIMPLE_H) @@ -2352,7 +2352,7 @@ tree-dump.o: tree-dump.c $(CONFIG_H) $(S tree-iterator.h $(TREE_PASS_H) $(DIAGNOSTIC_H) tree-inline.o : tree-inline.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(TREE_H) $(RTL_H) $(EXPR_H) $(FLAGS_H) $(PARAMS_H) $(INPUT_H) insn-config.h \ - $(HASHTAB_H) toplev.h langhooks.h $(TREE_INLINE_H) $(CGRAPH_H) \ + $(HASHTAB_H) langhooks.h $(TREE_INLINE_H) $(CGRAPH_H) \ intl.h $(FUNCTION_H) $(GIMPLE_H) \ debug.h $(DIAGNOSTIC_H) $(EXCEPT_H) $(TREE_FLOW_H) tree-iterator.h tree-mudflap.h \ $(IPA_PROP_H) value-prof.h $(TREE_PASS_H) $(TARGET_H) $(INTEGRATE_H) \ @@ -2498,7 +2498,7 @@ tree-cfg.o : tree-cfg.c $(TREE_FLOW_H) $ $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) $(FLAGS_H) output.h \ $(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \ $(TREE_DUMP_H) $(EXCEPT_H) langhooks.h $(CFGLOOP_H) $(TREE_PASS_H) \ - $(CFGLAYOUT_H) $(BASIC_BLOCK_H) toplev.h \ + $(CFGLAYOUT_H) $(BASIC_BLOCK_H) \ value-prof.h tree-ssa-propagate.h $(TREE_INLINE_H) tree-pretty-print.h \ gimple-pretty-print.h tree-cfgcleanup.o : tree-cfgcleanup.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ @@ -2646,7 +2646,7 @@ gimple-low.o : gimple-low.c $(CONFIG_H) $(DIAGNOSTIC_H) $(GIMPLE_H) $(TREE_INLINE_H) langhooks.h \ $(LANGHOOKS_DEF_H) $(TREE_FLOW_H) $(TIMEVAR_H) $(TM_H) coretypes.h \ $(EXCEPT_H) $(FLAGS_H) $(RTL_H) $(FUNCTION_H) $(EXPR_H) $(TREE_PASS_H) \ - $(HASHTAB_H) toplev.h $(DIAGNOSTIC_CORE_H) tree-iterator.h + $(HASHTAB_H) $(DIAGNOSTIC_CORE_H) tree-iterator.h omp-low.o : omp-low.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ $(RTL_H) $(GIMPLE_H) $(TREE_INLINE_H) langhooks.h $(DIAGNOSTIC_CORE_H) \ $(TREE_FLOW_H) $(TIMEVAR_H) $(FLAGS_H) $(EXPR_H) $(DIAGNOSTIC_CORE_H) \ @@ -2732,7 +2732,7 @@ graphite-scop-detection.o: graphite-scop graphite-scop-detection.h graphite-poly.h graphite-sese-to-poly.o: graphite-sese-to-poly.c $(CONFIG_H) \ $(SYSTEM_H) coretypes.h $(TM_H) \ - $(GGC_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) toplev.h $(DIAGNOSTIC_CORE_H) \ + $(GGC_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(DIAGNOSTIC_CORE_H) \ $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) $(GIMPLE_H) \ $(TREE_DATA_REF_H) tree-pass.h domwalk.h graphite.h \ pointer-set.h value-prof.h graphite-ppl.h sese.h \ @@ -2836,7 +2836,7 @@ opts-common.o : opts-common.c $(OPTS_H) targhooks.o : targhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \ $(EXPR_H) $(TM_H) $(RTL_H) $(TM_P_H) $(FUNCTION_H) output.h $(DIAGNOSTIC_CORE_H) \ $(MACHMODE_H) $(TARGET_DEF_H) $(TARGET_H) $(GGC_H) gt-targhooks.h \ - $(OPTABS_H) $(RECOG_H) reload.h hard-reg-set.h + $(OPTABS_H) $(RECOG_H) reload.h hard-reg-set.h intl.h $(OPTS_H) bversion.h: s-bversion; @true s-bversion: BASE-VER @@ -2878,7 +2878,7 @@ passes.o : passes.c $(CONFIG_H) $(SYSTEM $(PLUGIN_H) plugin.o : plugin.c $(PLUGIN_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h \ - toplev.h $(DIAGNOSTIC_CORE_H) $(TREE_H) $(TREE_PASS_H) intl.h $(PLUGIN_VERSION_H) $(GGC_H) + $(DIAGNOSTIC_CORE_H) $(TREE_H) $(TREE_PASS_H) intl.h $(PLUGIN_VERSION_H) $(GGC_H) main.o : main.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) toplev.h $(DIAGNOSTIC_CORE_H) @@ -2902,7 +2902,7 @@ rtlanal.o : rtlanal.c $(CONFIG_H) $(SYST varasm.o : varasm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ $(RTL_H) $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) hard-reg-set.h $(REGS_H) \ - output.h toplev.h $(DIAGNOSTIC_CORE_H) xcoffout.h debug.h $(GGC_H) $(TM_P_H) \ + output.h $(DIAGNOSTIC_CORE_H) xcoffout.h debug.h $(GGC_H) $(TM_P_H) \ $(HASHTAB_H) $(TARGET_H) langhooks.h gt-varasm.h $(BASIC_BLOCK_H) \ $(CFGLAYOUT_H) $(CGRAPH_H) targhooks.h tree-mudflap.h \ tree-iterator.h pointer-set.h @@ -2983,7 +2983,7 @@ dwarf2asm.o : dwarf2asm.c $(CONFIG_H) $( vmsdbgout.o : vmsdbgout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) version.h \ $(FLAGS_H) $(RTL_H) output.h vmsdbg.h debug.h langhooks.h $(FUNCTION_H) $(TARGET_H) xcoffout.o : xcoffout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ - $(TREE_H) $(RTL_H) xcoffout.h $(FLAGS_H) toplev.h $(DIAGNOSTIC_CORE_H) output.h dbxout.h \ + $(TREE_H) $(RTL_H) xcoffout.h $(FLAGS_H) $(DIAGNOSTIC_CORE_H) output.h dbxout.h \ $(GGC_H) $(TARGET_H) debug.h $(GSTAB_H) xcoff.h godump.o : godump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DIAGNOSTIC_CORE_H) \ $(TREE_H) $(GGC_H) pointer-set.h $(OBSTACK_H) debug.h Index: gcc/tree-cfg.c =================================================================== --- gcc/tree-cfg.c (revision 167307) +++ gcc/tree-cfg.c (working copy) @@ -38,7 +38,6 @@ along with GCC; see the file COPYING3. #include "tree-dump.h" #include "tree-pass.h" #include "diagnostic-core.h" -#include "toplev.h" #include "except.h" #include "cfgloop.h" #include "cfglayout.h" Index: gcc/config/alpha/alpha.c =================================================================== --- gcc/config/alpha/alpha.c (revision 167307) +++ gcc/config/alpha/alpha.c (working copy) @@ -42,7 +42,6 @@ along with GCC; see the file COPYING3. #include "except.h" #include "function.h" #include "diagnostic-core.h" -#include "toplev.h" #include "ggc.h" #include "integrate.h" #include "tm_p.h" Index: gcc/config/frv/frv.c =================================================================== --- gcc/config/frv/frv.c (revision 167307) +++ gcc/config/frv/frv.c (working copy) @@ -40,7 +40,6 @@ along with GCC; see the file COPYING3. #include "function.h" #include "optabs.h" #include "diagnostic-core.h" -#include "toplev.h" #include "basic-block.h" #include "tm_p.h" #include "ggc.h" Index: gcc/config/s390/s390.c =================================================================== --- gcc/config/s390/s390.c (revision 167307) +++ gcc/config/s390/s390.c (working copy) @@ -41,7 +41,6 @@ along with GCC; see the file COPYING3. #include "expr.h" #include "reload.h" #include "diagnostic-core.h" -#include "toplev.h" #include "basic-block.h" #include "integrate.h" #include "ggc.h" Index: gcc/config/m32c/m32c.c =================================================================== --- gcc/config/m32c/m32c.c (revision 167307) +++ gcc/config/m32c/m32c.c (working copy) @@ -35,7 +35,6 @@ #include "recog.h" #include "reload.h" #include "diagnostic-core.h" -#include "toplev.h" #include "obstack.h" #include "tree.h" #include "expr.h" Index: gcc/config/spu/t-spu-elf =================================================================== --- gcc/config/spu/t-spu-elf (revision 167307) +++ gcc/config/spu/t-spu-elf (working copy) @@ -107,7 +107,7 @@ spu.o: $(CONFIG_H) $(SYSTEM_H) coretypes $(RTL_H) $(REGS_H) hard-reg-set.h \ real.h insn-config.h conditions.h insn-attr.h flags.h $(RECOG_H) \ $(OBSTACK_H) $(TREE_H) $(EXPR_H) $(OPTABS_H) except.h function.h \ - output.h $(BASIC_BLOCK_H) $(INTEGRATE_H) toplev.h $(GGC_H) $(HASHTAB_H) \ + output.h $(BASIC_BLOCK_H) $(INTEGRATE_H) $(GGC_H) $(HASHTAB_H) \ $(TM_P_H) $(TARGET_H) $(TARGET_DEF_H) langhooks.h reload.h cfglayout.h \ $(srcdir)/config/spu/spu-protos.h \ $(srcdir)/config/spu/spu-builtins.def Index: gcc/config/spu/spu.c =================================================================== --- gcc/config/spu/spu.c (revision 167307) +++ gcc/config/spu/spu.c (working copy) @@ -36,7 +36,6 @@ #include "basic-block.h" #include "integrate.h" #include "diagnostic-core.h" -#include "toplev.h" #include "ggc.h" #include "hashtab.h" #include "tm_p.h" Index: gcc/config/sparc/sparc.c =================================================================== --- gcc/config/sparc/sparc.c (revision 167307) +++ gcc/config/sparc/sparc.c (working copy) @@ -42,7 +42,6 @@ along with GCC; see the file COPYING3. #include "optabs.h" #include "recog.h" #include "diagnostic-core.h" -#include "toplev.h" #include "ggc.h" #include "tm_p.h" #include "debug.h" Index: gcc/config/mep/mep.c =================================================================== --- gcc/config/mep/mep.c (revision 167307) +++ gcc/config/mep/mep.c (working copy) @@ -44,7 +44,6 @@ along with GCC; see the file COPYING3. #include "tm_p.h" #include "ggc.h" #include "diagnostic-core.h" -#include "toplev.h" #include "integrate.h" #include "target.h" #include "target-def.h" Index: gcc/config/m32r/m32r.c =================================================================== --- gcc/config/m32r/m32r.c (revision 167307) +++ gcc/config/m32r/m32r.c (working copy) @@ -35,7 +35,6 @@ #include "function.h" #include "recog.h" #include "diagnostic-core.h" -#include "toplev.h" #include "ggc.h" #include "integrate.h" #include "df.h" Index: gcc/config/sh/sh.c =================================================================== --- gcc/config/sh/sh.c (revision 167307) +++ gcc/config/sh/sh.c (working copy) @@ -38,7 +38,6 @@ along with GCC; see the file COPYING3. #include "output.h" #include "insn-attr.h" #include "diagnostic-core.h" -#include "toplev.h" #include "recog.h" #include "integrate.h" #include "dwarf2.h" Index: gcc/config/pdp11/pdp11.c =================================================================== --- gcc/config/pdp11/pdp11.c (revision 167307) +++ gcc/config/pdp11/pdp11.c (working copy) @@ -36,7 +36,6 @@ along with GCC; see the file COPYING3. #include "tree.h" #include "expr.h" #include "diagnostic-core.h" -#include "toplev.h" #include "tm_p.h" #include "target.h" #include "target-def.h" Index: gcc/config/microblaze/microblaze.c =================================================================== --- gcc/config/microblaze/microblaze.c (revision 167307) +++ gcc/config/microblaze/microblaze.c (working copy) @@ -33,7 +33,6 @@ #include "insn-attr.h" #include "integrate.h" #include "recog.h" -#include "toplev.h" #include "tree.h" #include "function.h" #include "expr.h" Index: gcc/config/avr/avr.c =================================================================== --- gcc/config/avr/avr.c (revision 167307) +++ gcc/config/avr/avr.c (working copy) @@ -35,7 +35,6 @@ #include "output.h" #include "expr.h" #include "diagnostic-core.h" -#include "toplev.h" #include "obstack.h" #include "function.h" #include "recog.h" Index: gcc/config/crx/crx.c =================================================================== --- gcc/config/crx/crx.c (revision 167307) +++ gcc/config/crx/crx.c (working copy) @@ -44,7 +44,6 @@ #include "expr.h" #include "optabs.h" #include "diagnostic-core.h" -#include "toplev.h" #include "basic-block.h" #include "df.h" #include "target.h" Index: gcc/config/xtensa/xtensa.c =================================================================== --- gcc/config/xtensa/xtensa.c (revision 167307) +++ gcc/config/xtensa/xtensa.c (working copy) @@ -41,7 +41,6 @@ along with GCC; see the file COPYING3. #include "tm_p.h" #include "function.h" #include "diagnostic-core.h" -#include "toplev.h" #include "optabs.h" #include "libfuncs.h" #include "ggc.h" Index: gcc/config/stormy16/stormy16.c =================================================================== --- gcc/config/stormy16/stormy16.c (revision 167307) +++ gcc/config/stormy16/stormy16.c (working copy) @@ -34,7 +34,6 @@ #include "flags.h" #include "recog.h" #include "diagnostic-core.h" -#include "toplev.h" #include "obstack.h" #include "tree.h" #include "expr.h" Index: gcc/config/fr30/fr30.c =================================================================== --- gcc/config/fr30/fr30.c (revision 167307) +++ gcc/config/fr30/fr30.c (working copy) @@ -41,7 +41,6 @@ #include "function.h" #include "df.h" #include "diagnostic-core.h" -#include "toplev.h" #include "tm_p.h" #include "target.h" #include "target-def.h" Index: gcc/config/lm32/lm32.c =================================================================== --- gcc/config/lm32/lm32.c (revision 167307) +++ gcc/config/lm32/lm32.c (working copy) @@ -41,7 +41,6 @@ #include "tm_p.h" #include "function.h" #include "diagnostic-core.h" -#include "toplev.h" #include "optabs.h" #include "libfuncs.h" #include "ggc.h" Index: gcc/config/moxie/moxie.c =================================================================== --- gcc/config/moxie/moxie.c (revision 167307) +++ gcc/config/moxie/moxie.c (working copy) @@ -34,7 +34,6 @@ #include "recog.h" #include "reload.h" #include "diagnostic-core.h" -#include "toplev.h" #include "obstack.h" #include "tree.h" #include "expr.h" Index: gcc/config/m68hc11/m68hc11.c =================================================================== --- gcc/config/m68hc11/m68hc11.c (revision 167307) +++ gcc/config/m68hc11/m68hc11.c (working copy) @@ -51,7 +51,6 @@ Note: #include "expr.h" #include "libfuncs.h" #include "diagnostic-core.h" -#include "toplev.h" #include "basic-block.h" #include "function.h" #include "ggc.h" Index: gcc/config/cris/cris.c =================================================================== --- gcc/config/cris/cris.c (revision 167307) +++ gcc/config/cris/cris.c (working copy) @@ -35,7 +35,6 @@ along with GCC; see the file COPYING3. #include "except.h" #include "function.h" #include "diagnostic-core.h" -#include "toplev.h" #include "recog.h" #include "reload.h" #include "tm_p.h" Index: gcc/config/iq2000/iq2000.c =================================================================== --- gcc/config/iq2000/iq2000.c (revision 167307) +++ gcc/config/iq2000/iq2000.c (working copy) @@ -37,7 +37,6 @@ along with GCC; see the file COPYING3. #include "libfuncs.h" #include "recog.h" #include "diagnostic-core.h" -#include "toplev.h" #include "reload.h" #include "ggc.h" #include "tm_p.h" Index: gcc/config/mn10300/mn10300.c =================================================================== --- gcc/config/mn10300/mn10300.c (revision 167307) +++ gcc/config/mn10300/mn10300.c (working copy) @@ -39,7 +39,6 @@ #include "function.h" #include "obstack.h" #include "diagnostic-core.h" -#include "toplev.h" #include "tm_p.h" #include "target.h" #include "target-def.h" Index: gcc/config/ia64/ia64.c =================================================================== --- gcc/config/ia64/ia64.c (revision 167307) +++ gcc/config/ia64/ia64.c (working copy) @@ -43,7 +43,6 @@ along with GCC; see the file COPYING3. #include "basic-block.h" #include "libfuncs.h" #include "diagnostic-core.h" -#include "toplev.h" #include "sched-int.h" #include "timevar.h" #include "target.h" Index: gcc/config/m68k/m68k.c =================================================================== --- gcc/config/m68k/m68k.c (revision 167307) +++ gcc/config/m68k/m68k.c (working copy) @@ -34,7 +34,6 @@ along with GCC; see the file COPYING3. #include "insn-attr.h" #include "recog.h" #include "diagnostic-core.h" -#include "toplev.h" #include "expr.h" #include "reload.h" #include "tm_p.h" Index: gcc/config/picochip/picochip.c =================================================================== --- gcc/config/picochip/picochip.c (revision 167307) +++ gcc/config/picochip/picochip.c (working copy) @@ -42,7 +42,6 @@ along with GCC; see the file COPYING3. #include "basic-block.h" #include "integrate.h" #include "diagnostic-core.h" -#include "toplev.h" #include "ggc.h" #include "hashtab.h" #include "tm_p.h" Index: gcc/config/arc/arc.c =================================================================== --- gcc/config/arc/arc.c (revision 167307) +++ gcc/config/arc/arc.c (working copy) @@ -37,7 +37,6 @@ along with GCC; see the file COPYING3. #include "expr.h" #include "recog.h" #include "diagnostic-core.h" -#include "toplev.h" #include "df.h" #include "tm_p.h" #include "target.h" Index: gcc/config/mcore/mcore.c =================================================================== --- gcc/config/mcore/mcore.c (revision 167307) +++ gcc/config/mcore/mcore.c (working copy) @@ -41,7 +41,6 @@ #include "function.h" #include "ggc.h" #include "diagnostic-core.h" -#include "toplev.h" #include "target.h" #include "target-def.h" #include "df.h" Index: gcc/config/score/score.c =================================================================== --- gcc/config/score/score.c (revision 167307) +++ gcc/config/score/score.c (working copy) @@ -30,7 +30,6 @@ #include "insn-attr.h" #include "recog.h" #include "diagnostic-core.h" -#include "toplev.h" #include "output.h" #include "tree.h" #include "function.h" Index: gcc/config/arm/arm.c =================================================================== --- gcc/config/arm/arm.c (revision 167307) +++ gcc/config/arm/arm.c (working copy) @@ -41,7 +41,6 @@ #include "expr.h" #include "optabs.h" #include "diagnostic-core.h" -#include "toplev.h" #include "recog.h" #include "cgraph.h" #include "ggc.h" Index: gcc/config/arm/t-arm =================================================================== --- gcc/config/arm/t-arm (revision 167307) +++ gcc/config/arm/t-arm (working copy) @@ -49,7 +49,7 @@ arm.o: $(CONFIG_H) $(SYSTEM_H) coretypes $(RTL_H) $(TREE_H) $(OBSTACK_H) $(REGS_H) hard-reg-set.h \ insn-config.h conditions.h output.h \ $(INSN_ATTR_H) $(FLAGS_H) reload.h $(FUNCTION_H) \ - $(EXPR_H) $(OPTABS_H) toplev.h $(RECOG_H) $(CGRAPH_H) \ + $(EXPR_H) $(OPTABS_H) $(RECOG_H) $(CGRAPH_H) \ $(GGC_H) except.h $(C_PRAGMA_H) $(INTEGRATE_H) $(TM_P_H) \ $(TARGET_H) $(TARGET_DEF_H) debug.h langhooks.h $(DF_H) \ intl.h libfuncs.h $(PARAMS_H) Index: gcc/config/pa/pa.c =================================================================== --- gcc/config/pa/pa.c (revision 167307) +++ gcc/config/pa/pa.c (working copy) @@ -40,7 +40,6 @@ along with GCC; see the file COPYING3. #include "integrate.h" #include "function.h" #include "diagnostic-core.h" -#include "toplev.h" #include "ggc.h" #include "recog.h" #include "predict.h" Index: gcc/config/mips/mips.c =================================================================== --- gcc/config/mips/mips.c (revision 167307) +++ gcc/config/mips/mips.c (working copy) @@ -34,7 +34,6 @@ along with GCC; see the file COPYING3. #include "conditions.h" #include "insn-attr.h" #include "recog.h" -#include "toplev.h" #include "output.h" #include "tree.h" #include "function.h" Index: gcc/config/vax/vax.c =================================================================== --- gcc/config/vax/vax.c (revision 167307) +++ gcc/config/vax/vax.c (working copy) @@ -39,7 +39,6 @@ along with GCC; see the file COPYING3. #include "flags.h" #include "debug.h" #include "diagnostic-core.h" -#include "toplev.h" #include "tm-preds.h" #include "tm-constrs.h" #include "tm_p.h" Index: gcc/config/v850/v850.c =================================================================== --- gcc/config/v850/v850.c (revision 167307) +++ gcc/config/v850/v850.c (working copy) @@ -36,7 +36,6 @@ #include "expr.h" #include "function.h" #include "diagnostic-core.h" -#include "toplev.h" #include "ggc.h" #include "integrate.h" #include "tm_p.h" Index: gcc/config/h8300/h8300.c =================================================================== --- gcc/config/h8300/h8300.c (revision 167307) +++ gcc/config/h8300/h8300.c (working copy) @@ -39,7 +39,6 @@ along with GCC; see the file COPYING3. #include "function.h" #include "optabs.h" #include "diagnostic-core.h" -#include "toplev.h" #include "c-family/c-pragma.h" /* ??? */ #include "tm_p.h" #include "ggc.h" Index: gcc/config/mmix/mmix.c =================================================================== --- gcc/config/mmix/mmix.c (revision 167307) +++ gcc/config/mmix/mmix.c (working copy) @@ -36,7 +36,6 @@ along with GCC; see the file COPYING3. #include "function.h" #include "expr.h" #include "diagnostic-core.h" -#include "toplev.h" #include "recog.h" #include "ggc.h" #include "dwarf2.h" Index: gcc/config/bfin/bfin.c =================================================================== --- gcc/config/bfin/bfin.c (revision 167307) +++ gcc/config/bfin/bfin.c (working copy) @@ -41,7 +41,6 @@ #include "target-def.h" #include "expr.h" #include "diagnostic-core.h" -#include "toplev.h" #include "recog.h" #include "optabs.h" #include "ggc.h"