Go patch committed: Panic arguments have empty interface type

2 views
Skip to first unread message

Ian Lance Taylor

unread,
Aug 5, 2024, 7:08:05 PM8/5/24
to gcc-patches, gofrontend-dev
This patch to the Go frontend determines that panic arguments are
empty interfaces. After https://go.dev/cl//536643 passing NULL as the
expected type permitted an untyped constant expression to remain
untyped. This change will fix them to take on the empty interface
type.

The panic and print/println functions are the only builtin functions
that turn an untyped constant expression into a regular function call,
and we already handled print/println specially.

This fixes https://go.dev/issue/68734. The test case is
https://go.dev/cl/603096.

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

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