diff options
author | bothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-22 23:10:22 +0000 |
---|---|---|
committer | bothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-22 23:10:22 +0000 |
commit | 5a2b4fcf0714e04ed5662917a65bf4e85d36a13e (patch) | |
tree | 3d7e2d566c0348ce538f6bff685f41747c37cd41 /gcc/diagnostic.c | |
parent | e9cb7519e9c1d850f79caf98f560b5c00b7ba732 (diff) | |
download | gcc-5a2b4fcf0714e04ed5662917a65bf4e85d36a13e.tar.gz |
* diagnostic.c.(diagnostic_report_current_module): Update to match
2003-06-05 changes to push_srcloc and pop_srcloc.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69687 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/diagnostic.c')
-rw-r--r-- | gcc/diagnostic.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index 34756112d68..be4b03cc7dd 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); } |