]> Cypherpunks repositories - gostls13.git/commitdiff
gc: appease bison version running on FreeBSD builder
authorRuss Cox <rsc@golang.org>
Thu, 2 Sep 2010 18:31:39 +0000 (14:31 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 2 Sep 2010 18:31:39 +0000 (14:31 -0400)
R=ken2
CC=golang-dev
https://golang.org/cl/2141042

src/cmd/gc/go.y

index 73b1ff4942affbed2bcd8f727257e98d7d77aea3..99ff40724bb200d752d38a2321784f074f1b128c 100644 (file)
 #include <stdio.h>     /* if we don't, bison will, and go.h re-#defines getc */
 #include "go.h"
 
-static void
-fixlbrace(int lbr)
-{
-       // If the opening brace was an LBODY,
-       // set up for another one now that we're done.
-       // See comment in lex.c about loophack.
-       if(lbr == LBODY)
-               loophack = 1;
-}
-
+static void fixlbrace(int);
 %}
 %union {
        Node*           node;
@@ -1938,3 +1929,16 @@ hidden_interfacedcl_list:
        {
                $$ = list($1, $3);
        }
+
+%%
+
+static void
+fixlbrace(int lbr)
+{
+       // If the opening brace was an LBODY,
+       // set up for another one now that we're done.
+       // See comment in lex.c about loophack.
+       if(lbr == LBODY)
+               loophack = 1;
+}
+