diff options
author | Russ Cox <rsc@golang.org> | 2009-01-05 11:18:15 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-01-05 11:18:15 -0800 |
commit | 21488682c828c089ba9543ce18424a4935798abb (patch) | |
tree | c0893f53bcc31b4caedb9bbf01a39fff3ebf7827 /src/cmd/cc | |
parent | 5d30c311e3166dc3bdbdaf789033370e9d329034 (diff) | |
download | golang-21488682c828c089ba9543ce18424a4935798abb.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')
-rw-r--r-- | src/cmd/cc/lexbody | 4 |
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(); |