Commit 6afbc885 by Joseph Myers Committed by Joseph Myers

gcc.c: Include diagnostic.h.

	* gcc.c: Include diagnostic.h.
	(error_count): Remove.  All users changed to use errorcount.
	(programname): Remove.  All users changed to use progname.
	(fancy_abort, internal_error, fatal_error, error, warning, inform,
	fnotice): Remove.
	(execute): Don't include "Internal error" and bug reporting
	information in argument of internal_error call.
	(process_command): Don't increment error_count after calling
	perror_with_name.
	(input_filename): Rename to gcc_input_filename.  All users
	changed.
	(main): Call diagnostic_initialize.  Register delete_temp_files
	with atexit.  Use seen_error to test for errors.
	* gcc.h: Include diagnostic-core.h.
	(fatal_error, error, warning): Remove.
	* Makefile.in (GCC_H): Add $(DIAGNOSTIC_CORE_H).
	(GCC_OBJS): Add diagnostic.o, pretty-print.o and input.o.
	(gcc.o): Update dependencies.

From-SVN: r160004
parent 0896cc66
2010-05-28 Joseph Myers <joseph@codesourcery.com>
* gcc.c: Include diagnostic.h.
(error_count): Remove. All users changed to use errorcount.
(programname): Remove. All users changed to use progname.
(fancy_abort, internal_error, fatal_error, error, warning, inform,
fnotice): Remove.
(execute): Don't include "Internal error" and bug reporting
information in argument of internal_error call.
(process_command): Don't increment error_count after calling
perror_with_name.
(input_filename): Rename to gcc_input_filename. All users
changed.
(main): Call diagnostic_initialize. Register delete_temp_files
with atexit. Use seen_error to test for errors.
* gcc.h: Include diagnostic-core.h.
(fatal_error, error, warning): Remove.
* Makefile.in (GCC_H): Add $(DIAGNOSTIC_CORE_H).
(GCC_OBJS): Add diagnostic.o, pretty-print.o and input.o.
(gcc.o): Update dependencies.
2010-05-28 Jeff Law <law@redhat.com> 2010-05-28 Jeff Law <law@redhat.com>
* ira.c (ira_bad_reload_regno, ira_build_reload_regno_1): New * ira.c (ira_bad_reload_regno, ira_build_reload_regno_1): New
......
...@@ -911,7 +911,7 @@ DF_H = df.h $(BITMAP_H) $(REGSET_H) sbitmap.h $(BASIC_BLOCK_H) \ ...@@ -911,7 +911,7 @@ DF_H = df.h $(BITMAP_H) $(REGSET_H) sbitmap.h $(BASIC_BLOCK_H) \
alloc-pool.h $(TIMEVAR_H) alloc-pool.h $(TIMEVAR_H)
RESOURCE_H = resource.h hard-reg-set.h $(DF_H) RESOURCE_H = resource.h hard-reg-set.h $(DF_H)
DDG_H = ddg.h sbitmap.h $(DF_H) DDG_H = ddg.h sbitmap.h $(DF_H)
GCC_H = gcc.h version.h GCC_H = gcc.h version.h $(DIAGNOSTIC_CORE_H)
GGC_H = ggc.h gtype-desc.h statistics.h GGC_H = ggc.h gtype-desc.h statistics.h
TIMEVAR_H = timevar.h timevar.def TIMEVAR_H = timevar.h timevar.def
INSN_ATTR_H = insn-attr.h $(INSN_ADDR_H) INSN_ATTR_H = insn-attr.h $(INSN_ADDR_H)
...@@ -1124,7 +1124,8 @@ CXX_TARGET_OBJS=@cxx_target_objs@ ...@@ -1124,7 +1124,8 @@ CXX_TARGET_OBJS=@cxx_target_objs@
FORTRAN_TARGET_OBJS=@fortran_target_objs@ FORTRAN_TARGET_OBJS=@fortran_target_objs@
# Object files for gcc driver. # Object files for gcc driver.
GCC_OBJS = gcc.o opts-common.o gcc-options.o GCC_OBJS = gcc.o opts-common.o gcc-options.o diagnostic.o pretty-print.o \
input.o
# Language-specific object files for C and Objective C. # Language-specific object files for C and Objective C.
C_AND_OBJC_OBJS = attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o \ C_AND_OBJC_OBJS = attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o \
...@@ -2130,7 +2131,7 @@ DRIVER_DEFINES = \ ...@@ -2130,7 +2131,7 @@ DRIVER_DEFINES = \
gcc.o: gcc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) intl.h multilib.h \ gcc.o: gcc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) intl.h multilib.h \
Makefile $(lang_specs_files) specs.h prefix.h $(GCC_H) $(FLAGS_H) \ Makefile $(lang_specs_files) specs.h prefix.h $(GCC_H) $(FLAGS_H) \
configargs.h $(OBSTACK_H) opts.h configargs.h $(OBSTACK_H) opts.h $(DIAGNOSTIC_H)
(SHLIB_LINK='$(SHLIB_LINK)'; \ (SHLIB_LINK='$(SHLIB_LINK)'; \
$(COMPILER) $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \ $(COMPILER) $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
$(DRIVER_DEFINES) \ $(DRIVER_DEFINES) \
......
...@@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see
#define GCC_GCC_H #define GCC_GCC_H
#include "version.h" #include "version.h"
#include "diagnostic-core.h"
/* The mapping of a spec function name to the C function that /* The mapping of a spec function name to the C function that
implements it. */ implements it. */
...@@ -59,10 +60,6 @@ struct spec_function ...@@ -59,10 +60,6 @@ struct spec_function
/* These are exported by gcc.c. */ /* These are exported by gcc.c. */
extern int do_spec (const char *); extern int do_spec (const char *);
extern void record_temp_file (const char *, int, int); extern void record_temp_file (const char *, int, int);
extern void fatal_error (const char *, ...)
ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
extern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
extern void warning (int, const char *, ...) ATTRIBUTE_PRINTF_2;
extern void pfatal_with_name (const char *) ATTRIBUTE_NORETURN; extern void pfatal_with_name (const char *) ATTRIBUTE_NORETURN;
extern void set_input (const char *); extern void set_input (const char *);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment