This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Go patch committed: Fix symbol name adjustments to match go tool


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] = '_';

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]