summaryrefslogtreecommitdiff
path: root/src/cmd/cc/lexbody
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-01-05 11:18:15 -0800
committerRuss Cox <rsc@golang.org>2009-01-05 11:18:15 -0800
commit618b277795f50beaa12f404bd50febc0e3623326 (patch)
treec0893f53bcc31b4caedb9bbf01a39fff3ebf7827 /src/cmd/cc/lexbody
parent99ef5a8b290eaf0b1823ec453851b291907f21a4 (diff)
downloadgo-618b277795f50beaa12f404bd50febc0e3623326.tar.gz
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
Diffstat (limited to 'src/cmd/cc/lexbody')
-rw-r--r--src/cmd/cc/lexbody4
1 files changed, 1 insertions, 3 deletions
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();