diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2015-05-20 15:58:15 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2015-05-20 15:58:15 +0000 |
commit | e4129dd0c9ec71767eeae6ddb3f65f697c6d8140 (patch) | |
tree | 0a01c9b29f9f929c3e5b95f242beb9a13d496df4 /gcc/diagnostic.c | |
parent | db7ffcabaf01826192370231d15b64cc15958aeb (diff) | |
download | gcc-e4129dd0c9ec71767eeae6ddb3f65f697c6d8140.tar.gz |
diagnostic.c (diagnostic_print_caret_line): Fix off-by-one error when printing the caret character.
gcc/ChangeLog
2015-05-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
* diagnostic.c (diagnostic_print_caret_line): Fix off-by-one error
when printing the caret character.
From-SVN: r223446
Diffstat (limited to 'gcc/diagnostic.c')
-rw-r--r-- | gcc/diagnostic.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |