On Fri, Aug 5, 2016 at 2:13 PM, Joseph Myers <jos...@codesourcery.com> wrote: > On Fri, 5 Aug 2016, Ian Lance Taylor wrote: > >> PR 72812 points out that Go can generate non-ASCII characters in >> assembly code. This is a consequence of the fact that Go permits >> identifiers to contain non-ASCII Unicode code points. The GNU >> assembler doesn't seem to mind, but the Solaris assembler does. > > Are Go identifiers meant to interoperate at the object code level with C > and C++ code using the same identifiers (with UCNs, for non-ASCII > identifiers in C and C++)? If so, this change would break such > interoperation, since C and C++ use UTF-8 in the compiler output for such > identifiers (and the tests are skipped/XFAILed for systems where the > assembler doesn't support this).
Interesting. In any case, no, they are not. Go identifiers are of the form p.N, where p is a package name, so they never interoperate with C/C++ code. There is a mechanism for specifying the external link name for a Go identifier, and for that case the compiler will not apply any encoding--it will just the name as written. Ian