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).
Looks good except for taking away the part where the error shows the gcc input. ...
14 years, 1 month ago
(2011-01-30 17:07:40 UTC)
#3
Looks good except for taking away the part where
the error shows the gcc input. At the least that should
be preserved under a -v (verbose) flag. That's invaluable
for understanding strange behavior. I can understand
if it isn't helpful for day-to-day usage.
Russ
initially i added a verbose flag, but then i noticed the -debug-gcc flag and thought ...
14 years, 1 month ago
(2011-01-30 17:29:54 UTC)
#4
initially i added a verbose flag, but then i noticed
the -debug-gcc flag and thought that was probably
sufficient. perhaps the usage message should be
changed to mention it though.
On 30 January 2011 17:07, Russ Cox <rsc@golang.org> wrote:
> Looks good except for taking away the part where
> the error shows the gcc input. At the least that should
> be preserved under a -v (verbose) flag. That's invaluable
> for understanding strange behavior. I can understand
> if it isn't helpful for day-to-day usage.
>
> Russ
>
*** Submitted as fcf755cfceb6 *** cgo: improve error reporting slightly. If there were warnings or ...
14 years, 1 month ago
(2011-01-31 19:31:37 UTC)
#7
*** Submitted as fcf755cfceb6 ***
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
http://codereview.appspot.com/4082047
Committer: Russ Cox <rsc@golang.org>
Issue 4082047: code review 4082047: cgo: improve error reporting slightly.
(Closed)
Created 14 years, 1 month ago by rog
Modified 14 years, 1 month ago
Reviewers:
Base URL:
Comments: 1