go/src/cmd/cgo
KJ Tsanaktsidis 786120b55d cmd/cgo: document #include <> search path behaviour
cgo effectively prepends -I${SRCDIR} to the header include path of all
preambles it processes, so when an #include <> matches a header file
both in the source directory and also another include directory, the
local copy will be used in preference.

This behaviour is surprising but unfortunately also longstanding and
relied upon by packages in the wild, so the best we can do is to
document it.

Fixes #41059

Change-Id: If6d2818294b2bd94ea0fe5fd6ce77e54b3e167a6
Reviewed-on: https://go-review.googlesource.com/c/go/+/251758
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-09-01 23:12:18 +00:00
..
ast.go cmd/cgo: simplify and fix handling of untyped constants 2019-03-06 21:16:20 +00:00
doc.go cmd/cgo: document #include <> search path behaviour 2020-09-01 23:12:18 +00:00
gcc.go cmd/cgo: ensure GCC does not use ANSI escape sequences in errors 2020-08-27 21:13:46 +00:00
godefs.go cmd/cgo: fix unexpected semicolon in rewritten line 2019-05-07 12:48:04 +00:00
main.go cmd/cgo: use explicit type for arg with bad pointer typedef 2019-03-07 01:42:23 +00:00
out.go cmd/cgo: close file 2020-08-18 04:11:37 +00:00
util.go cmd/go: change list -compiled to populate new CompiledGoFiles list 2018-08-01 00:35:19 +00:00