]> Cypherpunks repositories - gostls13.git/commit
cgo: improve error reporting slightly.
authorRoger Peppe <rogpeppe@gmail.com>
Mon, 31 Jan 2011 19:31:34 +0000 (14:31 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 31 Jan 2011 19:31:34 +0000 (14:31 -0500)
commit76130bdeeacc5d6d78102b4cbb6e0f110a812eb4
treef78056865952ffb07dc4740598a90ae58745a881
parent5c0aab9cae055203ad9afe8a116874dd1c53f51c
cgo: improve error reporting slightly.
If there were warnings or errors in the user code,
cgo would print the first error from gcc and then stop,
which is not helpful.
This CL makes cgo ignore errors from user code
in the first pass - they will be shown later.
It also prints errors from user preamble code
with the correct line numbers.
(Also fixed misleading usage message).

R=iant, rsc
CC=golang-dev
https://golang.org/cl/4082047
src/cmd/cgo/ast.go
src/cmd/cgo/gcc.go
src/cmd/cgo/main.go