Skip to content

Commit 43edf21

Browse files
committed
cmd/cgo: fix typo in gccgo name mangling recipe
The code to implement new-style gccgo name mangling had a recipe that didn't quite match that of the compiler (incorrect handling for '.'). This showed up as a failure in the gotools cgo test if the directory containing the test run included a "." character. [This is a copy of https://golang.org/cl/147917]. Change-Id: Ia94728ecead879c8d223eb6cee6c102a8af1c86e Reviewed-on: https://go-review.googlesource.com/c/147937 Reviewed-by: Cherry Zhang <[email protected]>
1 parent 8f7173d commit 43edf21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/cgo/out.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1271,7 +1271,7 @@ func gccgoPkgpathToSymbolNew(ppath string) string {
12711271
for _, c := range []byte(ppath) {
12721272
switch {
12731273
case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z',
1274-
'0' <= c && c <= '9', '_' == c:
1274+
'0' <= c && c <= '9', c == '_', c == '.':
12751275
bsl = append(bsl, c)
12761276
default:
12771277
changed = true

0 commit comments

Comments
 (0)