[PATCH] Correct -fdump-go-spec's handling of incomplete types

Nikhil Benesch nikhil.benesch@gmail.com
Wed Dec 16 20:13:37 GMT 2020


On 12/16/20 2:20 PM, Rainer Orth wrote:
> Hi Nikhil,
> 
>> On 12/15/20 3:00 AM, Nikhil Benesch wrote:
>>> If this patch looks good, I'll submit it upstream tomorrow.
>>
>> Assuming no news is good news, I sent
>> https://go-review.googlesource.com/c/gofrontend/+/278672.
> 
> sorry for the delay, but unfortunately news is not so good: I get
> 
> runtime_sysinfo.go:315:18: error: use of undefined type '_ucontext'
>    315 | type _ucontext_t _ucontext
>        |                  ^

No problem, Rainer. I figured there would be some hiccups. The somewhat good news
is that this error appears to be independent of the patch I sent upstream.

I suspect what is happening here is that godump sees "typedef ucontext_t struct
ucontext" and outputs the typedef immediately. Only later does it observe that
"struct ucontext" is invalid. At that point it is too late to comment out the
typedef for _ucontext_t.

Nikhil


More information about the Gcc-patches mailing list