]> Cypherpunks repositories - gostls13.git/commitdiff
fix 6a line number bug -
authorRuss Cox <rsc@golang.org>
Mon, 5 Jan 2009 19:18:15 +0000 (11:18 -0800)
committerRuss Cox <rsc@golang.org>
Mon, 5 Jan 2009 19:18:15 +0000 (11:18 -0800)
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

index 869bf377cc9b98f13186066005bb3419d3f60bd1..27e40fe49d3c795bb1cfb5895d71b02b49a08f03 100644 (file)
@@ -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();