This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, PR preprocessor/42014] Added LAST_SOURCE_COLUMN in while loop


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]