aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-09-02 14:31:39 -0400
committerRuss Cox <rsc@golang.org>2010-09-02 14:31:39 -0400
commit1cb951d9943727bd1587c539e0d132a6a532aa72 (patch)
tree58e8d1d6e9fa7b07b8a783439093107f80eb5a83
parenta37e3697da06e2bee7be21b107c7a2190bde35d8 (diff)
downloadgo-1cb951d9943727bd1587c539e0d132a6a532aa72.tar.gz
go-1cb951d9943727bd1587c539e0d132a6a532aa72.zip
gc: appease bison version running on FreeBSD builder
R=ken2 CC=golang-dev https://golang.org/cl/2141042
-rw-r--r--src/cmd/gc/go.y24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/cmd/gc/go.y b/src/cmd/gc/go.y
index 73b1ff4942..99ff40724b 100644
--- a/src/cmd/gc/go.y
+++ b/src/cmd/gc/go.y
@@ -21,16 +21,7 @@
#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;
+}
+