]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo: use first error position instead of last one
authorHiroshi Ioka <hirochachacha@gmail.com>
Mon, 5 Jun 2017 00:06:30 +0000 (09:06 +0900)
committerIan Lance Taylor <iant@golang.org>
Mon, 14 Aug 2017 05:29:11 +0000 (05:29 +0000)
commitb88e532a9ec5aa023c88c64bfaa1ded22bb4c963
tree5f5774ccd582c652afa9b58133d1f03ca83890c9
parent5b43bbe63b6dfe36f793f496a0e92a3804df0137
cmd/cgo: use first error position instead of last one

Just like https://golang.org/cl/34783

Given cgo.go:
     1 package main
     2
     3 /*
     4 long double x = 0;
     5 */
     6 import "C"
     7
     8 func main() {
     9 _ = C.x
    10 _ = C.x
    11 }

Before:
    ./cgo.go:10:6: unexpected: 16-byte float type - long double

After:
    ./cgo.go:9:6: unexpected: 16-byte float type - long double

The above test case is not portable. So it is tested on only amd64.

Change-Id: If0b84cf73d381a22e2ada71c8e9a6e6ec77ffd2e
Reviewed-on: https://go-review.googlesource.com/54950
Reviewed-by: Ian Lance Taylor <iant@golang.org>
misc/cgo/errors/err4.go [new file with mode: 0644]
misc/cgo/errors/test.bash
src/cmd/cgo/ast.go
src/cmd/cgo/gcc.go
src/cmd/cgo/main.go