-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/cgo: enum constants with value of 0 are garbled if they are the only ones used #3821
Labels
Comments
Indeed, the error is in the generated file as well. The value may change per run btw. If I uncomment the last line, both the constant ZERO and ONE are correctly defined. _cgo_gotypes.go: // Created by cgo - DO NOT EDIT package main import "unsafe" import "syscall" import _ "runtime/cgo" type _ unsafe.Pointer func _Cerrno(dst *error, x int) { *dst = syscall.Errno(x) } type _Ctype_int int32 type _Ctype_void [0]byte const _Cconst_ZERO = 0x1000007feedfacf |
Attached the generated files, as well as the source file for reference. Attachments:
|
This issue was closed by revision dd62bb4. Status changed to Fixed. |
minux
added a commit
that referenced
this issue
May 11, 2015
««« backport aeaab9df5600 cmd/cgo: use 1 as last entry for __cgodebug_data LLVM-based gcc will place all-zero data in a zero-filled section, but our debug/macho can't handle that. Fixes #3821. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6444049 »»»
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by mpvanlohuizen:
The text was updated successfully, but these errors were encountered: