This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Go patch committed: Update iota handling to current spec


This patch to the Go frontend updates the handling of iota to the
current language  spec; it was modified slightly in
https://golang.org/cl/71750.

Also, the Go frontend has been mishandling iota appearing in a type
that appears in a const expression, as in `c = len([iota]int{})`.
Correct that by copying type expressions when we copy an expression.
For simplicity only copy when it can change the size of a type, as
that is the only case where iota in a type can affect the value of a
constant (I think).  This is still a bunch of changes, but almost all
boilerplate.

This fixes https://golang.org/22341.

Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.  Committed
to mainline.

Ian

Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]