From c14c2b231ff05ff944a42978ea6032688a643d10 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 5 Jan 2009 11:18:15 -0800 Subject: [PATCH] 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(-) diff --git a/src/cmd/cc/lexbody b/src/cmd/cc/lexbody index 869bf377cc..27e40fe49d 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(); -- 2.48.1