aboutsummaryrefslogtreecommitdiff
path: root/gcc/diagnostic.c
diff options
context:
space:
mode:
authorPer Bothner <pbothner@apple.com>2003-07-22 23:10:22 +0000
committerPer Bothner <bothner@gcc.gnu.org>2003-07-22 16:10:22 -0700
commit53f72d60b6d2b4187b854f36f2768366418b3151 (patch)
tree3d7e2d566c0348ce538f6bff685f41747c37cd41 /gcc/diagnostic.c
parente81f8786c2d4249f26bd5e2d908dc2a2cd634524 (diff)
downloadgcc-53f72d60b6d2b4187b854f36f2768366418b3151.zip
gcc-53f72d60b6d2b4187b854f36f2768366418b3151.tar.gz
gcc-53f72d60b6d2b4187b854f36f2768366418b3151.tar.bz2
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
Diffstat (limited to 'gcc/diagnostic.c')
-rw-r--r--gcc/diagnostic.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c
index 3475611..be4b03c 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);
}