diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-27 20:16:07 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-27 20:16:07 +0000 |
commit | 852f689eb9b7f6d7aafc2f72007e96129ac9bd45 (patch) | |
tree | 7e6bdfc2594989da541ce8acef151a526222f9a7 /gcc/toplev.h | |
parent | 15a007df5edd3e7f2c80d11b4d01d1ff66c63f3a (diff) | |
download | linaro-gcc-852f689eb9b7f6d7aafc2f72007e96129ac9bd45.tar.gz linaro-gcc-852f689eb9b7f6d7aafc2f72007e96129ac9bd45.tar.bz2 linaro-gcc-852f689eb9b7f6d7aafc2f72007e96129ac9bd45.zip |
* diagnostic-core.h: New. Contents moved from diagnostic.h and
toplev.h.
* diagnostic.c: Don't include toplev.h.
(progname): Define. Moved from toplev.c.
(seen_error): New function.
* diagnostic.h: Include diagnostic-core.h.
(diagnostic_t, emit_diagnostic): Don't declare here.
* toplev.c (progname): Move to toplev.c.
(emit_debug_global_declarations, compile_file, finalize,
do_compile, toplev_main): Use seen_error.
* toplev.h: Include diagnostic-core.h.
(trim_filename, GCC_DIAG_STYLE, ATTRIBUTE_GCC_DIAG,
internal_error, warning, warning_at, error, error_n, error_at,
fatal_error, pedwarn, permerror, sorry, inform, inform_n,
verbatim, fnotice, progname): Move to diagnostic-core.h.
* builtins.c: Include diagnostic-core.h instead of diagnostic.h.
(expand_builtin_expect): Use seen_error.
* c-decl.c: Include diagnostic-core.h instead of diagnostic.h.
(c_make_fname_decl, c_write_global_declarations): Use seen_error.
* c-format.c: Include diagnostic-core.h instead of diagnostic.h.
* c-gimplify.c: Include diagnostic-core.h instead of diagnostic.h.
* c-lang.c: Include diagnostic-core.h instead of diagnostic.h.
* c-lex.c (c_lex_with_flags, interpret_float): Don't increment
errorcount for errors.
* c-opts.c (c_common_finish): Use seen_error.
* cgraph.c: Include diagnostic-core.h instead of diagnostic.h.
* cgraphunit.c (verify_cgraph_node, verify_cgraph,
cgraph_output_pending_asms, cgraph_optimize): Use seen_error.
* coverage.c: Include diagnostic-core.h instead of diagnostic.h.
(get_coverage_counts): Use seen_error.
* dwarf2out.c (dwarf2out_finish): Use seen_error.
* gimplify.c (gimplify_var_or_parm_decl, gimple_push_cleanup,
gimplify_body): Use seen_error.
* ipa-inline.c (cgraph_early_inlining): Use seen_error.
* ipa-pure-const.c (gate_pure_const): Use seen_error.
* ipa-reference.c (gate_reference): Use seen_error.
* jump.c: Include diagnostic-core.h instead of diagnostic.h.
* lambda-code.c: Include diagnostic-core.h instead of
diagnostic.h.
* lto-cgraph.c: Include diagnostic-core.h instead of diagnostic.h.
* lto-compress.c: Include diagnostic-core.h instead of
diagnostic.h.
* lto-section-in.c: Include diagnostic-core.h instead of
diagnostic.h.
* lto-streamer-out.c: Include diagnostic-core.h instead of
diagnostic.h.
* lto-streamer.c: Include diagnostic-core.h instead of
diagnostic.h.
(gate_lto_out): Use seen_error.
* matrix-reorg.c: Include diagnostic-core.h instead of
diagnostic.h.
* omega.c: Include diagnostic-core.h instead of diagnostic.h.
* omp-low.c: Include diagnostic-core.h instead of diagnostic.h.
(gate_expand_omp, lower_omp_1): Use seen_error.
* passes.c: Include diagnostic-core.h instead of diagnostic.h.
(rest_of_decl_compilation, rest_of_type_compilation,
gate_rest_of_compilation, ipa_write_summaries): Use seen_error.
* tree-cfg.c (label_to_block_fn): Use seen_error.
* tree-inline.c (optimize_inline_calls): Use seen_error.
* tree-mudflap.c (mudflap_finish_file): Use
seen_error.
* tree-optimize.c (gate_all_optimizations,
gate_all_early_local_passes, gate_all_early_optimizations): Use
seen_error.
* tree-ssa-structalias.c (gate_ipa_pta): Use seen_error.
* varpool.c: Include diagnostic-core.h instead of diagnostic.h.
(varpool_remove_unreferenced_decls,
varpool_assemble_pending_decls): Use seen_error.
* Makefile.in (DIAGNOSTIC_CORE_H): Define.
(TOPLEV_H, DIAGNOSTIC_H): Update.
(c-decl.o, c-lang.o, c-format.o, lto-compress.o, lto-cgraph.o,
lto-streamer-out.o, lto-section-in.o, lto-streamer.o,
c-gimplify.o, omp-low.o, omega.o, diagnostic.o, passes.o,
builtins.o, jump.o, cgraph.o, varpool.o, matrix-reorg.o,
coverage.o, lambda-code.o): Update dependencies.
cp:
* call.c: Include diagnostic-core.h instead of diagnostic.h.
* cp-lang.c: Don't include diagnostic.h
* name-lookup.c: Include diagnostic-core.h instead of
diagnostic.h.
(cp_emit_debug_info_for_using): Use seen_error.
* optimize.c: Include diagnostic-core.h instead of diagnostic.h.
* parser.c: Include diagnostic-core.h instead of diagnostic.h.
* pt.c (iterative_hash_template_arg): Use seen_error.
* repo.c: Include diagnostic-core.h instead of diagnostic.h.
* typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
* Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
dependencies.
lto:
* lto.c: Include diagnostic-core.h instead of diagnostic.h.
(read_cgraph_and_symbols, lto_main): Use seen_error.
* Make-lang.in (lto/lto.o): Update dependencies.
objc:
* objc-act.c: Include diagnostic-core.h instead of diagnostic.h.
* Make-lang.in (objc/objc-act.o): Update dependencies.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159947 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/toplev.h')
-rw-r--r-- | gcc/toplev.h | 45 |
1 files changed, 1 insertions, 44 deletions
diff --git a/gcc/toplev.h b/gcc/toplev.h index 033c6dcdae6..b7152f7b9e1 100644 --- a/gcc/toplev.h +++ b/gcc/toplev.h @@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see #define GCC_TOPLEV_H #include "input.h" #include "bversion.h" +#include "diagnostic-core.h" /* If non-NULL, return one past-the-end of the matching SUBPART of the WHOLE string. */ @@ -32,7 +33,6 @@ along with GCC; see the file COPYING3. If not see extern int toplev_main (int, char **); extern int read_integral_parameter (const char *, const char *, const int); extern void strip_off_ending (char *, int); -extern const char *trim_filename (const char *); extern void _fatal_insn_not_found (const_rtx, const char *, int, const char *) ATTRIBUTE_NORETURN; extern void _fatal_insn (const char *, const_rtx, const char *, int, const char *) @@ -43,41 +43,6 @@ extern void _fatal_insn (const char *, const_rtx, const char *, int, const char #define fatal_insn_not_found(insn) \ _fatal_insn_not_found (insn, __FILE__, __LINE__, __FUNCTION__) -/* If we haven't already defined a frontend specific diagnostics - style, use the generic one. */ -#ifndef GCC_DIAG_STYLE -#define GCC_DIAG_STYLE __gcc_tdiag__ -#endif -/* None of these functions are suitable for ATTRIBUTE_PRINTF, because - each language front end can extend them with its own set of format - specifiers. We must use custom format checks. */ -#if (ENABLE_CHECKING && GCC_VERSION >= 4001) || GCC_VERSION == BUILDING_GCC_VERSION -#define ATTRIBUTE_GCC_DIAG(m, n) __attribute__ ((__format__ (GCC_DIAG_STYLE, m, n))) ATTRIBUTE_NONNULL(m) -#else -#define ATTRIBUTE_GCC_DIAG(m, n) ATTRIBUTE_NONNULL(m) -#endif -extern void internal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2) - ATTRIBUTE_NORETURN; -/* Pass one of the OPT_W* from options.h as the first parameter. */ -extern bool warning (int, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); -extern bool warning_at (location_t, int, const char *, ...) - ATTRIBUTE_GCC_DIAG(3,4); -extern void error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); -extern void error_n (location_t, int, const char *, const char *, ...) - ATTRIBUTE_GCC_DIAG(3,5) ATTRIBUTE_GCC_DIAG(4,5); -extern void error_at (location_t, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); -extern void fatal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2) - ATTRIBUTE_NORETURN; -/* Pass one of the OPT_W* from options.h as the second parameter. */ -extern bool pedwarn (location_t, int, const char *, ...) - ATTRIBUTE_GCC_DIAG(3,4); -extern bool permerror (location_t, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); -extern void sorry (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); -extern void inform (location_t, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); -extern void inform_n (location_t, int, const char *, const char *, ...) - ATTRIBUTE_GCC_DIAG(3,5) ATTRIBUTE_GCC_DIAG(4,5); -extern void verbatim (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); - extern void rest_of_decl_compilation (tree, int, int); extern void rest_of_type_compilation (tree, int); extern void tree_rest_of_compilation (tree); @@ -97,13 +62,6 @@ extern void output_quoted_string (FILE *, const char *); extern void output_file_directive (FILE *, const char *); #endif -#ifdef BUFSIZ - /* N.B. Unlike all the others, fnotice is just gettext+fprintf, and - therefore it can have ATTRIBUTE_PRINTF. */ -extern void fnotice (FILE *, const char *, ...) - ATTRIBUTE_PRINTF_2; -#endif - extern void wrapup_global_declaration_1 (tree); extern bool wrapup_global_declaration_2 (tree); extern bool wrapup_global_declarations (tree *, int); @@ -122,7 +80,6 @@ extern unsigned local_tick; /* Top-level source file. */ extern const char *main_input_filename; -extern const char *progname; extern const char *dump_base_name; extern const char *dump_dir_name; extern const char *aux_base_name; |