mirror of
https://github.com/golang/go
synced 2024-11-20 08:04:42 -07:00
b2290229c2
A bit contrived to come up with an example, but it happened in #15836, somehow. $ cat /tmp/x.go package main /* #include <stddef.h> int foo(void); int foo(void) { return 2; } #define int asdf */ import "C" func main() { println(C.foo()) } $ go run /tmp/x.go # command-line-arguments cgo-builtin-prolog:9:31: error: unknown type name 'asdf' <<<<< _GoString_ GoStringN(char *p, int l); ^ /tmp/x.go:12:13: note: expanded from macro 'int' #define int asdf ^ cgo-builtin-prolog:10:28: error: unknown type name 'asdf' <<<<< _GoBytes_ GoBytes(void *p, int n); ^ /tmp/x.go:12:13: note: expanded from macro 'int' #define int asdf ^ 2 errors generated. The two marked lines used to refer incorrectly to /tmp/x.go. Fixes #15836. Change-Id: I08ef60a53cfd148112fceb651eaf7b75d94a7a8d Reviewed-on: https://go-review.googlesource.com/32613 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> |
||
---|---|---|
.. | ||
archive | ||
bufio | ||
builtin | ||
bytes | ||
cmd | ||
compress | ||
container | ||
context | ||
crypto | ||
database/sql | ||
debug | ||
encoding | ||
errors | ||
expvar | ||
flag | ||
fmt | ||
go | ||
hash | ||
html | ||
image | ||
index/suffixarray | ||
internal | ||
io | ||
log | ||
math | ||
mime | ||
net | ||
os | ||
path | ||
plugin | ||
reflect | ||
regexp | ||
runtime | ||
sort | ||
strconv | ||
strings | ||
sync | ||
syscall | ||
testing | ||
text | ||
time | ||
unicode | ||
unsafe | ||
vendor/golang_org/x | ||
all.bash | ||
all.bat | ||
all.rc | ||
androidtest.bash | ||
bootstrap.bash | ||
buildall.bash | ||
clean.bash | ||
clean.bat | ||
clean.rc | ||
cmp.bash | ||
iostest.bash | ||
make.bash | ||
make.bat | ||
Make.dist | ||
make.rc | ||
naclmake.bash | ||
nacltest.bash | ||
race.bash | ||
race.bat | ||
run.bash | ||
run.bat | ||
run.rc |