From dfa3226153fbfe4999f2af6d916fd597e1d5ce3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20L=C3=B3pez-Ib=C3=A1=C3=B1ez?= Date: Wed, 24 Oct 2012 22:01:50 +0000 Subject: re PR c++/54928 (Infinite output with after ICE with macro) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2012-10-24 Manuel López-Ibáñez PR c++/54928 * tree-diagnostic.c (maybe_unwind_expanded_macro_loc): Use diagnostic_append_note. * diagnostic.c (diagnostic_build_prefix): Make diagnostic const. (default_diagnostic_finalizer): Do not destroy prefix here. (diagnostic_report_diagnostic): Destroy it here. (diagnostic_append_note): New. * diagnostic.h (diagnostic_append_note): Declare. From-SVN: r192786 --- gcc/diagnostic.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/diagnostic.h') diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h index 976754e..e1d2146 100644 --- a/gcc/diagnostic.h +++ b/gcc/diagnostic.h @@ -282,8 +282,10 @@ extern void diagnostic_set_info_translated (diagnostic_info *, const char *, va_list *, location_t, diagnostic_t) ATTRIBUTE_GCC_DIAG(2,0); +extern void diagnostic_append_note (diagnostic_context *, location_t, + const char *, ...) ATTRIBUTE_GCC_DIAG(3,4); #endif -extern char *diagnostic_build_prefix (diagnostic_context *, diagnostic_info *); +extern char *diagnostic_build_prefix (diagnostic_context *, const diagnostic_info *); void default_diagnostic_starter (diagnostic_context *, diagnostic_info *); void default_diagnostic_finalizer (diagnostic_context *, diagnostic_info *); void diagnostic_set_caret_max_width (diagnostic_context *context, int value); -- cgit v1.1