From b8ba5b440b1f84920e80852ec984520046adaf3a Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 20 Nov 2024 13:51:53 -0800 Subject: [PATCH] cmd/cgo: improve error message for unknown name Fixes #70472 Change-Id: Ib50d1dd5a648afc199ed62a507d54d0b0ccb1da2 Reviewed-on: https://go-review.googlesource.com/c/go/+/630375 LUCI-TryBot-Result: Go LUCI Auto-Submit: Ian Lance Taylor Reviewed-by: Cherry Mui Reviewed-by: Russ Cox --- src/cmd/cgo/gcc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/cgo/gcc.go b/src/cmd/cgo/gcc.go index 7ef6c170d1..d2d7b894b5 100644 --- a/src/cmd/cgo/gcc.go +++ b/src/cmd/cgo/gcc.go @@ -490,7 +490,7 @@ func (p *Package) guessKinds(f *File) []*Name { // Don't report an error, and skip adding n to the needType array. continue } - error_(f.NamePos[n], "could not determine kind of name for C.%s", fixGo(n.Go)) + error_(f.NamePos[n], "could not determine what C.%s refers to", fixGo(n.Go)) case notStrLiteral | notType: n.Kind = "iconst" case notIntConst | notStrLiteral | notType: -- 2.48.1