golang/go

cmd/cgo: _GoString_ is a reserved identifier

开放

#29,877 创建于 2019年1月22日

 (5 条评论) (0 个反应) (0 位负责人)Go (19,008 个派生)batch import
NeedsFixcompiler/runtimehelp wanted

仓库指标

星标
 (133,883 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

(Removing the template since this is not really a code bug or so.)

https://golang.org/cmd/cgo/#hdr-Go_references_to_C explains that there's a type _GoString_. However, that name is reserved (see https://en.cppreference.com/w/c/language/identifier#Reserved_identifiers), and using it is technically undefined behavior. I'd suggest renaming the type to just GoString in future versions, with the old name as undocumented and deprecated alias.

贡献者指南