diff options
| author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-11-25 16:58:32 +0000 |
|---|---|---|
| committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-11-25 16:58:32 +0000 |
| commit | e4ba8dedac8c5cbe675bcabd5bf5a2e9dc4345ef (patch) | |
| tree | 255cdd5d37dc128a7ad564ade1d1db3d7b9f9af2 /gcc/toplev.c | |
| parent | e082bb8e4b692beae4e05992ad902bb731daa738 (diff) | |
| download | ppe42-gcc-e4ba8dedac8c5cbe675bcabd5bf5a2e9dc4345ef.tar.gz ppe42-gcc-e4ba8dedac8c5cbe675bcabd5bf5a2e9dc4345ef.zip | |
* c-common.c (check_format_info): Don't call a variadic function
with a non-literal format string.
* c-decl.c (grokdeclarator, start_struct, finish_struct): Likewise.
* c-typeck.c (build_component_ref, build_unary_op, lvalue_or_else,
pedantic_lvalue_warning, error_init, pedwarn_init, warning_init):
Likewise.
* cccp.c (check_macro_name, do_xifdef, vwarning_with_line):
Likewise.
* collect2.c (collect_wait): Likewise.
* dbxout.c (dbxout_type): Likewise.
* gcc.c (do_spec_1): Likewise.
* genemit.c (gen_insn, gen_expand): Likewise.
* genrecog.c (write_switch, write_subroutine): Likewise.
* mips-tfile.c (catch_signal, botch): Likewise.
* print-rtl.c (print_rtx): Likewise.
* toplev.c (default_print_error_function, report_error_function,
_fatal_insn): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30666 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/toplev.c')
| -rw-r--r-- | gcc/toplev.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index dbe5dceb9dc..06789158d9e 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1549,10 +1549,14 @@ default_print_error_function (file) if (current_function_decl == NULL) notice ("At top level:\n"); else - notice ((TREE_CODE (TREE_TYPE (current_function_decl)) == METHOD_TYPE - ? "In method `%s':\n" - : "In function `%s':\n"), - (*decl_printable_name) (current_function_decl, 2)); + { + if (TREE_CODE (TREE_TYPE (current_function_decl)) == METHOD_TYPE) + notice ("In method `%s':\n", + (*decl_printable_name) (current_function_decl, 2)); + else + notice ("In function `%s':\n", + (*decl_printable_name) (current_function_decl, 2)); + } last_error_function = current_function_decl; } @@ -1584,10 +1588,10 @@ report_error_function (file) && input_file_stack_tick != last_error_tick) { for (p = input_file_stack->next; p; p = p->next) - notice ((p == input_file_stack->next - ? "In file included from %s:%d" - : ",\n from %s:%d"), - p->name, p->line); + if (p == input_file_stack->next) + notice ("In file included from %s:%d", p->name, p->line); + else + notice (",\n from %s:%d", p->name, p->line); fprintf (stderr, ":\n"); last_error_tick = input_file_stack_tick; } @@ -1979,7 +1983,7 @@ _fatal_insn (msgid, insn, file, line, function) int line; const char *function; { - error (msgid); + error ("%s", msgid); debug_rtx (insn); fancy_abort (file, line, function); } |

