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: Resolve import parser ambiguity


This patch to the Go frontend by Than McIntosh resolves an importing
ambiguity for more complex function calls.  It tweaks the exporter for
inlinable function bodies to work around a problem with importing of
function calls whose function expressions are not simple function
names.  In the bug in question, the function body exporter was writing
out a function call of the form

       (*(*FuncTyp)(var))(arg)

which produced an export data representation of

       *$convert(<type 5>, var)(x)

which is hard to parse unambiguously.  Fix: change the export data
emitter to introduce parens around the function expression for more
complex calls.

Testcase for this bug is in https://golang.org/cl/197217.

This fixes http://golang.org/issue/34503.

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]