diff options
author | Nathan Sidwell <nathan@acm.org> | 1999-04-26 00:07:58 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-04-25 18:07:58 -0600 |
commit | c1709d0c7ad2a6dbcda2bde402e2fd747fa6cfd9 (patch) | |
tree | 7a22cdf0489acf3fd914eab860845f580079d624 /gcc | |
parent | 13ee407e02f9bdd7d182301f9ccd1e8a236dec0e (diff) | |
download | gcc-c1709d0c7ad2a6dbcda2bde402e2fd747fa6cfd9.zip gcc-c1709d0c7ad2a6dbcda2bde402e2fd747fa6cfd9.tar.gz gcc-c1709d0c7ad2a6dbcda2bde402e2fd747fa6cfd9.tar.bz2 |
toplev.c (report_error_function): Reorder file stack and function name printing.
* toplev.c (report_error_function): Reorder file stack and
function name printing. Ignore FILE parameter.
From-SVN: r26631
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/toplev.c | 12 |
2 files changed, 11 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 75802c5..349ca81 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Mon Apr 26 01:02:34 1999 Nathan Sidwell <nathan@acm.org> + + * toplev.c (report_error_function): Reorder file stack and + function name printing. Ignore FILE parameter. + Mon Apr 26 00:58:54 1999 Jerry Quinn <jquinn@nortelnetworks.com> * 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 f5e534c..58fafc1 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. */ |