From 21488682c828c089ba9543ce18424a4935798abb Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 5 Jan 2009 11:18:15 -0800 Subject: fix 6a line number bug - was incrementing lineno twice for the \n after a // comment. R=r DELTA=3 (0 added, 2 deleted, 1 changed) OCL=21984 CL=22021 --- src/cmd/cc/lexbody | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/cmd/cc') diff --git a/src/cmd/cc/lexbody b/src/cmd/cc/lexbody index 869bf377c..27e40fe49 100644 --- a/src/cmd/cc/lexbody +++ b/src/cmd/cc/lexbody @@ -462,10 +462,8 @@ l1: if(c1 == '/') { for(;;) { c = GETC(); - if(c == '\n') { - lineno++; + if(c == '\n') goto l1; - } if(c == EOF) { yyerror("eof in comment"); errorexit(); -- cgit v1.2.3