From: Per Bothner Date: Tue, 22 Jul 2003 23:10:22 +0000 (+0000) Subject: diagnostic.c. (diagnostic_report_current_module): Update to match 2003-06-05 changes... X-Git-Tag: releases/gcc-3.4.0~4672 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=53f72d60b6d2b4187b854f36f2768366418b3151;p=thirdparty%2Fgcc.git diagnostic.c. (diagnostic_report_current_module): Update to match 2003-06-05 changes to push_srcloc and pop_srcloc. * diagnostic.c.(diagnostic_report_current_module): Update to match 2003-06-05 changes to push_srcloc and pop_srcloc. From-SVN: r69687 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 444b55fe87c7..21263c286940 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-07-22 Per Bothner + + * diagnostic.c.(diagnostic_report_current_module): Update to match + 2003-06-05 changes to push_srcloc and pop_srcloc. + 2003-07-22 Wolfgang Bangerth * doc/trouble.texi: Better document two-stage name lookup. diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index 34756112d681..be4b03cc7dd7 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -978,18 +978,16 @@ diagnostic_report_current_module (diagnostic_context *context) output_needs_newline (&context->buffer) = false; } - if (input_file_stack && input_file_stack->next != 0 - && diagnostic_last_module_changed (context)) + if (input_file_stack && diagnostic_last_module_changed (context)) { - for (p = input_file_stack->next; p; p = p->next) - if (p == input_file_stack->next) - output_verbatim (&context->buffer, - "In file included from %s:%d", - p->location.file, p->location.line); - else - output_verbatim (&context->buffer, - ",\n from %s:%d", - p->location.file, p->location.line); + p = input_file_stack; + output_verbatim (&context->buffer, + "In file included from %s:%d", + p->location.file, p->location.line); + while ((p = p->next) != NULL) + output_verbatim (&context->buffer, + ",\n from %s:%d", + p->location.file, p->location.line); output_verbatim (&context->buffer, ":\n"); diagnostic_set_last_module (context); }