Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/cgo: don't replace newlines with semicolons in composite literals
Fixes #29748 Change-Id: I2b19165bdb3c99df5b79574390b5d5f6d40462dc Reviewed-on: https://go-review.googlesource.com/c/157961 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
- Loading branch information
1 parent
3e9c3cf
commit 76e8ca4
Showing
2 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright 2019 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
// Error handling a struct initializer that requires pointer checking. | ||
// Compilation test only, nothing to run. | ||
|
||
package cgotest | ||
|
||
// typedef struct { char **p; } S29748; | ||
// static int f29748(S29748 *p) { return 0; } | ||
import "C" | ||
|
||
var Vissue29748 = C.f29748(&C.S29748{ | ||
nil, | ||
}) | ||
|
||
func Fissue299748() { | ||
C.f29748(&C.S29748{ | ||
nil, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters