]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo: match note following error in compiler errors
authorIan Lance Taylor <iant@golang.org>
Thu, 25 May 2017 22:12:54 +0000 (15:12 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 14 Jun 2017 17:07:19 +0000 (17:07 +0000)
commitdcaac4b36535c9b80104c33567d775743f111c0b
treefe21f13f703cfc980457680b969f87143e3a2e39
parent491ec4dff51dfe7ba721c85da0a30eceb99aa85c
cmd/cgo: match note following error in compiler errors

With current GCC a macro that refers to another macro can report an
error on the macro definition line, with a note on the use.
When cgo is trying to decide which line an error refers to,
it is looking at the uses. So if we see an error on a line that we
don't recognize followed by a note on a line that we do recognize,
treat the note as an error.

Fixes #20125.

Change-Id: I389cd0eb7d56ad2d54bef70e278d9f76c4d36448
Reviewed-on: https://go-review.googlesource.com/44290
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Hiroshi Ioka <hirochachacha@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
misc/cgo/test/issue18720.go
src/cmd/cgo/gcc.go