This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Go patch committed: Fix symbol name adjustments to match go tool
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org, gofrontend-dev at googlegroups dot com
- Date: Thu, 02 Oct 2014 10:56:52 -0700
- Subject: Go patch committed: Fix symbol name adjustments to match go tool
- Authentication-results: sourceware.org; auth=none
In the go tool, when converting the pkgpath argument to use for a symbol
name, everything except alphanumeric characters is converted to an
underscore character. This is PR 61880. This patch from Alexander
Shopov changes the Go frontend to match, so that the symbol names
generated by the cgo tool come out the same. Bootstrapped and ran Go
testsuite on x86_64-unknown-linux-gnu. Committed to mainline.
Ian
diff -r 82a9d752ff1f go/gogo.cc
--- a/go/gogo.cc Thu Oct 02 10:53:01 2014 -0700
+++ b/go/gogo.cc Thu Oct 02 10:54:51 2014 -0700
@@ -258,10 +258,7 @@
char c = s[i];
if ((c >= 'a' && c <= 'z')
|| (c >= 'A' && c <= 'Z')
- || (c >= '0' && c <= '9')
- || c == '_'
- || c == '.'
- || c == '$')
+ || (c >= '0' && c <= '9'))
;
else
s[i] = '_';