errors.out.go raw
1 // CGo errors:
2 // testdata/errors.go:14:1: missing function name in #cgo noescape line
3 // testdata/errors.go:15:1: multiple function names in #cgo noescape line
4 // testdata/errors.go:4:2: warning: some warning
5 // testdata/errors.go:11:9: error: unknown type name 'someType'
6 // testdata/errors.go:31:5: warning: another warning
7 // testdata/errors.go:18:23: unexpected token ), expected end of expression
8 // testdata/errors.go:26:26: unexpected token ), expected end of expression
9 // testdata/errors.go:21:33: unexpected token ), expected end of expression
10 // testdata/errors.go:22:34: unexpected token ), expected end of expression
11 // -: unexpected token INT, expected end of expression
12 // testdata/errors.go:35:35: unexpected number of parameters: expected 2, got 3
13 // testdata/errors.go:36:31: unexpected number of parameters: expected 2, got 1
14 // testdata/errors.go:3:1: function "unusedFunction" in #cgo noescape line is not used
15
16 // Type checking errors after CGo processing:
17 // testdata/errors.go:102: cannot use 2 << 10 (untyped int constant 2048) as _Cgo_char value in variable declaration (overflows)
18 // testdata/errors.go:105: unknown field z in struct literal
19 // testdata/errors.go:108: undefined: _Cgo_SOME_CONST_1
20 // testdata/errors.go:110: cannot use _Cgo_SOME_CONST_3 (untyped int constant 1234) as byte value in variable declaration (overflows)
21 // testdata/errors.go:112: undefined: _Cgo_SOME_CONST_4
22 // testdata/errors.go:114: undefined: _Cgo_SOME_CONST_b
23 // testdata/errors.go:116: undefined: _Cgo_SOME_CONST_startspace
24 // testdata/errors.go:119: undefined: _Cgo_SOME_PARAM_CONST_invalid
25 // testdata/errors.go:122: undefined: _Cgo_add_toomuch
26 // testdata/errors.go:123: undefined: _Cgo_add_toolittle
27
28 package main
29
30 import "syscall"
31 import "unsafe"
32
33 var _ unsafe.Pointer
34
35 //go:linkname _Cgo_CString runtime.cgo_CString
36 func _Cgo_CString(string) *_Cgo_char
37
38 //go:linkname _Cgo_GoString runtime.cgo_GoString
39 func _Cgo_GoString(*_Cgo_char) string
40
41 //go:linkname _Cgo___GoStringN runtime.cgo_GoStringN
42 func _Cgo___GoStringN(*_Cgo_char, uintptr) string
43
44 func _Cgo_GoStringN(cstr *_Cgo_char, length _Cgo_int) string {
45 return _Cgo___GoStringN(cstr, uintptr(length))
46 }
47
48 //go:linkname _Cgo___GoBytes runtime.cgo_GoBytes
49 func _Cgo___GoBytes(unsafe.Pointer, uintptr) []byte
50
51 func _Cgo_GoBytes(ptr unsafe.Pointer, length _Cgo_int) []byte {
52 return _Cgo___GoBytes(ptr, uintptr(length))
53 }
54
55 //go:linkname _Cgo___CBytes runtime.cgo_CBytes
56 func _Cgo___CBytes([]byte) unsafe.Pointer
57
58 func _Cgo_CBytes(b []byte) unsafe.Pointer {
59 return _Cgo___CBytes(b)
60 }
61
62 //go:linkname _Cgo___get_errno_num runtime.cgo_errno
63 func _Cgo___get_errno_num() uintptr
64
65 func _Cgo___get_errno() error {
66 return syscall.Errno(_Cgo___get_errno_num())
67 }
68
69 type (
70 _Cgo_char uint8
71 _Cgo_schar int8
72 _Cgo_uchar uint8
73 _Cgo_short int16
74 _Cgo_ushort uint16
75 _Cgo_int int32
76 _Cgo_uint uint32
77 _Cgo_long int32
78 _Cgo_ulong uint32
79 _Cgo_longlong int64
80 _Cgo_ulonglong uint64
81 )
82 type _Cgo_struct_point_t struct {
83 x _Cgo_int
84 y _Cgo_int
85 }
86 type _Cgo_point_t = _Cgo_struct_point_t
87
88 const _Cgo_SOME_CONST_3 = 1234
89 const _Cgo_SOME_PARAM_CONST_valid = 3 + 4
90