You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Create the following file:
package enum
// typedef enum {a, b, c, d} foo;
import "C"
import "fmt"
func Test() {fmt.Printf("%d %d %d %d\n", C.a, C.b, C.c, C.d); }
2. Run cgo on it and note that it generates references of the form _C_a
referring to an enum.so file
3. Append the following line and rerun cgo:
func Test2() C.foo { return C.a; }
The addition of this line causes constants a, b, c, and d to be defined in
the package, and causes the generated Test() code to refer to those constants.
The latter behavior seems more correct and should probably happen in either
case.
Which revision are you using? (hg identify)
a6fcf4303b0a release/release.2009-12-22