1
1
diff --git a/src/cmd/cgo/out.go b/src/cmd/cgo/out.go
2
- index 1fddbb6..00574e6 100644
2
+ index 1fddbb6..410c182 100644
3
3
--- a/src/cmd/cgo/out.go
4
4
+++ b/src/cmd/cgo/out.go
5
- @@ -776,6 +776,13 @@ func (p *Package) writeGccgoOutputFunc(fgcc *os.File, n *Name) {
6
- fmt.Fprintf(fgcc, ");\n")
7
- }
8
- fmt.Fprintf(fgcc, "\t_cgo_tsan_release();\n")
9
- + // We use packed structs, but they are always aligned.
10
- + // The pragmas and address-of-packed-member are not recognized as warning groups in clang 3.4.1, so ignore unknown pragmas first.
11
- + // remove as part of #27619 (all: drop support for FreeBSD 10).
12
- + // fmt.Fprintf(fgcc, "#pragma GCC diagnostic ignored \"-Wunknown-pragmas\"\n")
13
- + // fmt.Fprintf(fgcc, "#pragma GCC diagnostic ignored \"-Wpragmas\"\n")
14
- + // fmt.Fprintf(fgcc, "#pragma GCC diagnostic ignored \"-Waddress-of-packed-member\"\n")
15
- +
16
- if t := n.FuncType.Result; t != nil {
17
- fmt.Fprintf(fgcc, "\treturn ")
18
- // Cast to void* to avoid warnings due to omitted qualifiers
19
- @@ -814,9 +821,9 @@ func (p *Package) writeExports(fgo2, fm, fgcc, fgcch io.Writer) {
5
+ @@ -814,9 +814,9 @@ func (p *Package) writeExports(fgo2, fm, fgcc, fgcch io.Writer) {
20
6
// We use packed structs, but they are always aligned.
21
7
// The pragmas and address-of-packed-member are only recognized as
22
8
// warning groups in clang 4.0+, so ignore unknown pragmas first.
@@ -29,7 +15,7 @@ index 1fddbb6..00574e6 100644
29
15
30
16
fmt.Fprintf(fgcc, "extern void crosscall2(void (*fn)(void *, int, __SIZE_TYPE__), void *, int, __SIZE_TYPE__);\n")
31
17
fmt.Fprintf(fgcc, "extern __SIZE_TYPE__ _cgo_wait_runtime_init_done(void);\n")
32
- @@ -1519,10 +1526 ,10 @@ extern char* _cgo_topofstack(void);
18
+ @@ -1519,10 +1519 ,10 @@ extern char* _cgo_topofstack(void);
33
19
We use packed structs, but they are always aligned.
34
20
The pragmas and address-of-packed-member are only recognized as warning
35
21
groups in clang 4.0+, so ignore unknown pragmas first.
@@ -62,4 +48,4 @@ index 5c300f5..c315c96 100644
62
48
+ MOVL $SYS_epoll_wait, AX
63
49
SYSCALL
64
50
MOVL AX, ret+24(FP)
65
- RET
51
+ RET
0 commit comments