common.opt (main_input_filename, [...]): New Variable entries.

* 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.

cp:
	* 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:
	* jcf-parse.c: Don't include toplev.h.
	* Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h.

From-SVN: r167329
This commit is contained in:
Joseph Myers 2010-12-01 13:46:36 +00:00 committed by Joseph Myers
parent 950691fafd
commit a803773f0e
67 changed files with 352 additions and 338 deletions

View File

@ -1,3 +1,55 @@
2010-12-01 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-12-01 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46730

View File

@ -2050,7 +2050,7 @@ c-parser.o : c-parser.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
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) $(SYSTEM_H) coretypes.h $(TM_H) \
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) $(CONFIG_H) $(SYSTEM_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) $(SYSTEM_H) $(TREE_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-detection.c $(CONFIG_H) $(SYSTEM_H) \
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) $(FLAGS_H) $(CONFIG_H) $(SYSTEM_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_H) coretypes.h $(TM_H) $(TREE_H) \
$(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) $(SYSTEM_H) coretypes.h $(TM_H) toplev.h $(DIA
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) $(SYSTEM_H) coretypes.h $(TM_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

View File

@ -35,7 +35,6 @@ along with GCC; see the file COPYING3. If not see
#include "c-lang.h"
#include "flags.h"
#include "output.h"
#include "toplev.h"
#include "intl.h"
#include "target.h"
#include "tree-iterator.h"

View File

@ -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

View File

@ -42,7 +42,6 @@ along with GCC; see the file COPYING3. If not see
#include "except.h"
#include "function.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "ggc.h"
#include "integrate.h"
#include "tm_p.h"

View File

@ -37,7 +37,6 @@ along with GCC; see the file COPYING3. If not see
#include "expr.h"
#include "recog.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "df.h"
#include "tm_p.h"
#include "target.h"

View File

@ -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"

View File

@ -49,7 +49,7 @@ arm.o: $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(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)

View File

@ -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"

View File

@ -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"

View File

@ -35,7 +35,6 @@ along with GCC; see the file COPYING3. If not see
#include "except.h"
#include "function.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "recog.h"
#include "reload.h"
#include "tm_p.h"

View File

@ -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"

View File

@ -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"

View File

@ -40,7 +40,6 @@ along with GCC; see the file COPYING3. If not see
#include "function.h"
#include "optabs.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "basic-block.h"
#include "tm_p.h"
#include "ggc.h"

View File

@ -39,7 +39,6 @@ along with GCC; see the file COPYING3. If not see
#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"

View File

@ -43,7 +43,6 @@ along with GCC; see the file COPYING3. If not see
#include "basic-block.h"
#include "libfuncs.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "sched-int.h"
#include "timevar.h"
#include "target.h"

View File

@ -37,7 +37,6 @@ along with GCC; see the file COPYING3. If not see
#include "libfuncs.h"
#include "recog.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "reload.h"
#include "ggc.h"
#include "tm_p.h"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -34,7 +34,6 @@ along with GCC; see the file COPYING3. If not see
#include "insn-attr.h"
#include "recog.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "expr.h"
#include "reload.h"
#include "tm_p.h"

View File

@ -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"

View File

@ -44,7 +44,6 @@ along with GCC; see the file COPYING3. If not see
#include "tm_p.h"
#include "ggc.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "integrate.h"
#include "target.h"
#include "target-def.h"

View File

@ -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"

View File

@ -34,7 +34,6 @@ along with GCC; see the file COPYING3. If not see
#include "conditions.h"
#include "insn-attr.h"
#include "recog.h"
#include "toplev.h"
#include "output.h"
#include "tree.h"
#include "function.h"

View File

@ -36,7 +36,6 @@ along with GCC; see the file COPYING3. If not see
#include "function.h"
#include "expr.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "recog.h"
#include "ggc.h"
#include "dwarf2.h"

View File

@ -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"

View File

@ -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"

View File

@ -40,7 +40,6 @@ along with GCC; see the file COPYING3. If not see
#include "integrate.h"
#include "function.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "ggc.h"
#include "recog.h"
#include "predict.h"

View File

@ -36,7 +36,6 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "expr.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "tm_p.h"
#include "target.h"
#include "target-def.h"

View File

@ -42,7 +42,6 @@ along with GCC; see the file COPYING3. If not, see
#include "basic-block.h"
#include "integrate.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "ggc.h"
#include "hashtab.h"
#include "tm_p.h"

View File

@ -41,7 +41,6 @@ along with GCC; see the file COPYING3. If not see
#include "expr.h"
#include "reload.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "basic-block.h"
#include "integrate.h"
#include "ggc.h"

View File

@ -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"

View File

@ -38,7 +38,6 @@ along with GCC; see the file COPYING3. If not see
#include "output.h"
#include "insn-attr.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "recog.h"
#include "integrate.h"
#include "dwarf2.h"

View File

@ -42,7 +42,6 @@ along with GCC; see the file COPYING3. If not see
#include "optabs.h"
#include "recog.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "ggc.h"
#include "tm_p.h"
#include "debug.h"

View File

@ -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"

View File

@ -107,7 +107,7 @@ spu.o: $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(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

View File

@ -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"

View File

@ -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"

View File

@ -39,7 +39,6 @@ along with GCC; see the file COPYING3. If not see
#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"

View File

@ -41,7 +41,6 @@ along with GCC; see the file COPYING3. If not see
#include "tm_p.h"
#include "function.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "optabs.h"
#include "libfuncs.h"
#include "ggc.h"

View File

@ -1,3 +1,9 @@
2010-12-01 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.
2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
* decl.c (finish_function): Call objc_finish_function when

View File

@ -247,7 +247,7 @@ CXX_TREE_H = $(TREE_H) cp/name-lookup.h cp/cp-tree.h $(C_COMMON_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) $(TM_H) $(FLAGS_H) cp/decl.h \
$(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)

View File

@ -25,7 +25,6 @@ along with GCC; see the file COPYING3. If not see
#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"

View File

@ -33,7 +33,6 @@ along with GCC; see the file COPYING3. If not see
#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"

View File

@ -34,7 +34,6 @@ along with GCC; see the file COPYING3. If not see
#include "cp-tree.h"
#include "flags.h"
#include "output.h"
#include "toplev.h"
#include "diagnostic.h"
#include "intl.h"
#include "target.h"

View File

@ -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.

View File

@ -31,7 +31,6 @@ along with GCC; see the file COPYING3. If not see
#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

View File

@ -28,7 +28,6 @@ along with GCC; see the file COPYING3. If not see
#include "basic-block.h"
#include "diagnostic.h"
#include "tree-flow.h"
#include "toplev.h"
#include "tree-dump.h"
#include "timevar.h"
#include "cfgloop.h"

View File

@ -1,3 +1,8 @@
2010-12-01 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.
2010-11-30 Joseph Myers <joseph@codesourcery.com>
* boehm.c: Don't include toplev.h.

View File

@ -295,7 +295,7 @@ java/expr.o: java/expr.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h $(REAL_H) \
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) \

View File

@ -35,7 +35,6 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "javaop.h"
#include "java-tree.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "parse.h"
#include "ggc.h"
#include "debug.h"

View File

@ -229,11 +229,12 @@ read_cmdline_options (struct gcc_options *opts, struct gcc_options *opts_set,
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;

View File

@ -298,6 +298,8 @@ extern void output_shared_constant_pool (void);
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

View File

@ -33,7 +33,6 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "tree.h"
#include "tree-pass.h"
#include "intl.h"

View File

@ -67,6 +67,8 @@ along with GCC; see the file COPYING3. If not see
#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 }

View File

@ -176,3 +176,6 @@ extern section * default_function_section(tree decl, enum node_frequency freq,
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);

View File

@ -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 *vec, int len)
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,

View File

@ -22,11 +22,6 @@ along with GCC; see the file COPYING3. If not see
#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_attribute;
/* 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;

View File

@ -38,7 +38,6 @@ along with GCC; see the file COPYING3. If not see
#include "tree-dump.h"
#include "tree-pass.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "except.h"
#include "cfgloop.h"
#include "cfglayout.h"

View File

@ -32,6 +32,11 @@ along with GCC; see the file COPYING3. If not see
#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);

View File

@ -23,7 +23,6 @@ along with GCC; see the file COPYING3. If not see
#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"

View File

@ -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"

View File

@ -4959,6 +4959,7 @@ extern tree tree_strip_nop_conversions (tree);
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 */

View File

@ -40,7 +40,6 @@ along with GCC; see the file COPYING3. If not see
#include "regs.h"
#include "output.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "hashtab.h"
#include "ggc.h"
#include "langhooks.h"

View File

@ -31,7 +31,6 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "flags.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "output.h"
#include "ggc.h"
#include "target.h"