[gccgo] Don't export top level function literals

Ian Lance Taylor iant@google.com
Fri Jun 25 08:57:00 GMT 2010


Given code like

var Usage = func() {
	fmt.Fprintf(os.Stderr, "Usage of %s:\n", os.Args[0])
	PrintDefaults()
}

gccgo was exporting the function literal under the name __nested1.
That makes no sense.  Fixed with this patch which also avoids
namespace issues.  Committed to gccgo branch.

Ian

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


More information about the Gcc-patches mailing list