From e4129dd0c9ec71767eeae6ddb3f65f697c6d8140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20L=C3=B3pez-Ib=C3=A1=C3=B1ez?= Date: Wed, 20 May 2015 15:58:15 +0000 Subject: diagnostic.c (diagnostic_print_caret_line): Fix off-by-one error when printing the caret character. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gcc/ChangeLog 2015-05-20 Manuel López-Ibáñez * diagnostic.c (diagnostic_print_caret_line): Fix off-by-one error when printing the caret character. From-SVN: r223446 --- gcc/diagnostic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/diagnostic.c') diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index 8f7a9e1b478..8b70a16ad09 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -420,7 +420,8 @@ diagnostic_print_caret_line (diagnostic_context * context, int caret_min = cmin == xloc1.column ? caret1 : caret2; int caret_max = cmin == xloc1.column ? caret2 : caret1; - pp_space (context->printer); + /* cmin is >= 1, but we indent with an extra space at the start like + we did above. */ int i; for (i = 0; i < cmin; i++) pp_space (context->printer); -- cgit v1.2.1