Files
llgo/compiler/cl/_testrt/structsize/in.go

20 lines
193 B
Go
Raw Normal View History

2024-07-11 21:41:54 +08:00
package main
import (
"unsafe"
"github.com/goplus/llgo/c"
)
type Foo struct {
A byte
B uint8
C uint16
D byte
E [8]int8
}
func main() {
c.Printf(c.Str("%d"), unsafe.Sizeof(Foo{}))
}