Skip to content
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: Go name for C typedefs is difficult to predict, and is undocumented #4255

gopherbot opened this issue Oct 17, 2012 · 3 comments


Copy link

commented Oct 17, 2012

by yargevad:

What steps will reproduce the problem?

What is the expected output?
Successful compilation

What do you see instead?
timeval.go:14[...]: cannot use tv.Sec (type int64) as type
_Ctype___darwin_time_t in assignment
timeval.go:15[...]: cannot use tv.Usec (type int32) as type
_Ctype___darwin_suseconds_t in assignment

Which compiler are you using (5g, 6g, 8g, gccgo)?

Which operating system are you using?
OSX 10.7.5

Which version are you using?  (run 'go version')
$ go version
go version go1.0.3

Please provide any additional information below.
The example code provided is trivial and useless. That's the shortest way I know of to
illustrate what I'm seeing, even though that same functionality is available using the
syscall package. I'm integrating against a C library that has functions that take
'struct timeval's as parameters.

This comment has been minimized.

Copy link

commented Oct 20, 2012

Comment 2:

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.


This comment has been minimized.

Copy link

commented Dec 10, 2012

Comment 3:

Labels changed: added size-m.


This comment has been minimized.

Copy link

commented Feb 1, 2013

Comment 4:

This issue was closed by revision 32a6097.

Status changed to Fixed.

@gopherbot gopherbot added fixed labels Feb 1, 2013

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015

@rsc rsc removed the go1.1 label Apr 14, 2015

@golang golang locked and limited conversation to collaborators Jun 24, 2016

This issue was closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
3 participants
You can’t perform that action at this time.