Go patch committed: Fix parse of for with possible composite literal

Ian Lance Taylor iant@google.com
Fri May 4 19:33:00 GMT 2012


This patch to the Go frontend fixes a bad parse.  For code like
    for first := true; first; first = false {
the frontend would erroneously assume that "false {" could be the start
of a composite literal.  It can't be, because composite literals in a
for statement must be parenthesized.  Bootstrapped and ran Go testsuite
on x86_64-unknown-linux-gnu.  Committed to mainline and gccgo branch.

Ian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-diff
Size: 8471 bytes
Desc: patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120504/3dbde8b2/attachment.bin>


More information about the Gcc-patches mailing list