mirror of
https://github.com/golang/go
synced 2024-11-17 12:24:51 -07:00
b88e532a9e
Just like https://golang.org/cl/34783 Given cgo.go: 1 package main 2 3 /* 4 long double x = 0; 5 */ 6 import "C" 7 8 func main() { 9 _ = C.x 10 _ = C.x 11 } Before: ./cgo.go:10:6: unexpected: 16-byte float type - long double After: ./cgo.go:9:6: unexpected: 16-byte float type - long double The above test case is not portable. So it is tested on only amd64. Change-Id: If0b84cf73d381a22e2ada71c8e9a6e6ec77ffd2e Reviewed-on: https://go-review.googlesource.com/54950 Reviewed-by: Ian Lance Taylor <iant@golang.org>
16 lines
259 B
Go
16 lines
259 B
Go
// Copyright 2017 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.
|
|
|
|
package main
|
|
|
|
/*
|
|
long double x = 0;
|
|
*/
|
|
import "C"
|
|
|
|
func main() {
|
|
_ = C.x // ERROR HERE
|
|
_ = C.x
|
|
}
|