diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 75802c5cba8..349ca8116ae 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Mon Apr 26 01:02:34 1999 Nathan Sidwell + + * toplev.c (report_error_function): Reorder file stack and + function name printing. Ignore FILE parameter. + Mon Apr 26 00:58:54 1999 Jerry Quinn * pa/pa-hpux.h, pa/pa-hpux10.h, pa/pa-hpux9.h, pa/pa-osf.h, pa.h, diff --git a/gcc/toplev.c b/gcc/toplev.c index f5e534cb2fc..58fafc1db29 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1544,11 +1544,12 @@ void (*print_error_function) PROTO((const char *)) = default_print_error_function; /* Prints out, if necessary, the name of the current function - that caused an error. Called from all error and warning functions. */ + that caused an error. Called from all error and warning functions. + We ignore the FILE parameter, as it cannot be relied upon. */ void report_error_function (file) - const char *file; + const char *file ATTRIBUTE_UNUSED; { struct file_stack *p; @@ -1558,11 +1559,8 @@ report_error_function (file) need_error_newline = 0; } - (*print_error_function) (file); - if (input_file_stack && input_file_stack->next != 0 - && input_file_stack_tick != last_error_tick - && file == input_filename) + && input_file_stack_tick != last_error_tick) { for (p = input_file_stack->next; p; p = p->next) notice ((p == input_file_stack->next @@ -1572,6 +1570,8 @@ report_error_function (file) fprintf (stderr, ":\n"); last_error_tick = input_file_stack_tick; } + + (*print_error_function) (input_filename); } /* Print a message. */