1
0
mirror of https://github.com/golang/go synced 2024-09-29 14:24:32 -06:00
go/misc/cgo/test/issue29781.go
Ian Lance Taylor dd1889cb22 cmd/cgo: don't replace newlines with semicolons in expressions
Fixes #29781

Change-Id: Id032d07a54b8c24f0c6d3f6e512932f76920ee04
Reviewed-on: https://go-review.googlesource.com/c/158457
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-01-18 03:25:40 +00:00

18 lines
435 B
Go

// 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 with newline inserted into constant expression.
// Compilation test only, nothing to run.
package cgotest
// static void issue29781F(char **p, int n) {}
// #define ISSUE29781C 0
import "C"
func issue29781G() {
var p *C.char
C.issue29781F(&p, C.ISSUE29781C+1)
}