Go frontend patch committed: traverse method declarations

25 views
Skip to first unread message

Ian Lance Taylor

unread,
Dec 4, 2024, 6:20:36 PM12/4/24
to gcc-patches, gofrontend-dev
This patch to the Go frontend changes traversal to always traverse
method declarations (method definitions were already traversed). This
removes one existing case that explicitly traversed method
declarations, in favor of the common approach.

Note that the gc Go compiler rejects method declarations, and maybe
the Go frontend should too. But not today.

This avoids a compiler crash (https://gcc.gnu.org/PR117891) if there
are method declarations with types that require specific functions. I
didn't bother with a test case because a program with method
declarations is almost certainly invalid anyhow.

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

Ian
patch.txt
Reply all
Reply to author
Forward
0 new messages