This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, PR preprocessor/42014] Added LAST_SOURCE_COLUMN in while loop
- From: Shakthi Kannan <skannan at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 10 May 2013 02:55:07 -0400 (EDT)
- Subject: [PATCH, PR preprocessor/42014] Added LAST_SOURCE_COLUMN in while loop
- Reply-to: Shakthi Kannan <skannan at redhat dot com>
Hi,
The attached patch adds LAST_SOURCE_COLUMN to pp_verbatim
function in the while loop present in
diagnostic_report_current_module(). This makes the output
consistent for any error parsing program as stated in the bug.
2013-05-10 Shakthi Kannan <skannan@redhat.com>
PR preprocessor/42014
* gcc/diagnostic.c: Added LAST_SOURCE_COLUMN in while loop.
---
gcc/diagnostic.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c
index f9a236b..2addbf0 100644
--- a/gcc/diagnostic.c
+++ b/gcc/diagnostic.c
@@ -528,8 +528,9 @@ diagnostic_report_current_module (diagnostic_context *context, location_t where)
{
map = INCLUDED_FROM (line_table, map);
pp_verbatim (context->printer,
- ",\n from %s:%d",
- LINEMAP_FILE (map), LAST_SOURCE_LINE (map));
+ ",\n from %s:%d:%d",
+ LINEMAP_FILE (map),
+ LAST_SOURCE_LINE (map), LAST_SOURCE_COLUMN (map));
}
pp_verbatim (context->printer, ":");
pp_newline (context->printer);
--
1.7.11.7