From: Russ Cox Date: Thu, 12 Nov 2009 00:58:27 +0000 (-0800) Subject: cgo: add more information about gcc output parsing failures X-Git-Tag: weekly.2009-11-12~14 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=ae3341476d4c7ece87758eccc8d927fa9ee2b5dc;p=gostls13.git cgo: add more information about gcc output parsing failures R=r https://golang.org/cl/152084 --- diff --git a/src/cmd/cgo/gcc.go b/src/cmd/cgo/gcc.go index 6e9ba13b76..d6b5c6bc85 100644 --- a/src/cmd/cgo/gcc.go +++ b/src/cmd/cgo/gcc.go @@ -96,6 +96,10 @@ func (p *Prog) loadDebugInfo() { } } + if nerrors > 0 { + fatal("failed to interpret gcc output:\n%s", stderr) + } + // Extract the types from the DWARF section of an object // from a well-formed C program. Gcc only generates DWARF info // for symbols in the object file, so it is not enough to print the