From 900b8becb3afbeffb5c8595b7b83e447ccf7c03f Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 9 Jan 2012 11:22:26 -0800 Subject: [PATCH] cgo: if value for constant did not parse, get it from DWARF info R=rsc, borman CC=golang-dev https://golang.org/cl/5525043 --- src/cmd/cgo/gcc.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cmd/cgo/gcc.go b/src/cmd/cgo/gcc.go index 3c95d28be49..75ce1782a06 100644 --- a/src/cmd/cgo/gcc.go +++ b/src/cmd/cgo/gcc.go @@ -453,6 +453,11 @@ func (p *Package) guessKinds(f *File) []*Name { for i, b := range isConst { if b { names[i].Kind = "const" + if toSniff[i] != nil && names[i].Const == "" { + j := len(needType) + needType = needType[0 : j+1] + needType[j] = names[i] + } } } for _, n := range toSniff {