scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 78edebdf4d11d94de525b8e566a322b4ff3af0f5
parent 7ae0c4ae76b0c372e6c8bb622bd8527b74159a39
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Mon, 25 May 2015 13:36:36 +0200

Fix number of line in errors in cc1

Processing lines is done after reading them, so the number
is already incremented when it is used, leading to having
the number of line incremented in 1 in all the error
messages.

Diffstat:
Mcc1/lex.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cc1/lex.c b/cc1/lex.c @@ -37,7 +37,7 @@ addinput(char *fname) { Input *ip; FILE *fp; - unsigned short nline = 1; + unsigned short nline = 0; /* TODO: Add a field in input to see easier which is the case where we are */