summaryrefslogtreecommitdiff
path: root/src/cmd/gc
diff options
context:
space:
mode:
authorR?my Oudompheng <oudomphe@phare.normalesup.org>2013-06-23 18:39:07 +0200
committerR?my Oudompheng <oudomphe@phare.normalesup.org>2013-06-23 18:39:07 +0200
commit8eaf1205ec77716563d3f2df735da3252995d323 (patch)
tree2cfad54692543919322c8ecd09ba8a213d314176 /src/cmd/gc
parent47c6f814448b41a2d1dd517c1f3ffdd1d95aae54 (diff)
downloadgo-8eaf1205ec77716563d3f2df735da3252995d323.tar.gz
cmd/gc: fix pointer composite literals in exported if statements.
Fixes issue 4230 (again). R=rsc, golang-dev, r CC=golang-dev https://codereview.appspot.com/10470043
Diffstat (limited to 'src/cmd/gc')
-rw-r--r--src/cmd/gc/fmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/gc/fmt.c b/src/cmd/gc/fmt.c
index d541c967a..c7519c976 100644
--- a/src/cmd/gc/fmt.c
+++ b/src/cmd/gc/fmt.c
@@ -1222,7 +1222,7 @@ exprfmt(Fmt *f, Node *n, int prec)
}
if(fmtmode == FExp && ptrlit)
// typecheck has overwritten OIND by OTYPE with pointer type.
- return fmtprint(f, "&%T{ %,H }", n->right->type->type, n->list);
+ return fmtprint(f, "(&%T{ %,H })", n->right->type->type, n->list);
return fmtprint(f, "(%N{ %,H })", n->right, n->list);
case OPTRLIT: