mirror of
https://github.com/golang/go.git
synced 2025-11-09 05:01:01 +00:00
Without the fix:
$ CC=clang-3.5 ./test.bash
misc/cgo/errors/test.bash: BUG: expected error output to contain "C.ushort" but saw:
# command-line-arguments
./issue13129.go:13: cannot use int(0) (type int) as type C.unsignedshort in assignment
Fixes #13129.
Change-Id: I2c019d2d000f5bfa3e33c477e533aff97031a84f
Reviewed-on: https://go-review.googlesource.com/17207
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
14 lines
319 B
Go
14 lines
319 B
Go
// Copyright 2015 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.
|
|
|
|
// issue 13129: used to output error about C.unsignedshort with CC=clang
|
|
|
|
package main
|
|
|
|
import "C"
|
|
|
|
func main() {
|
|
var x C.ushort
|
|
x = int(0) // ERROR HERE
|
|
}
|