const_sizeof.go 231 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 // RUN: llgo -o %t %s // RUN: %t 2>&1 | FileCheck %s // CHECK: 8 // CHECK-NEXT: 8 package main import "unsafe" const ptrSize = unsafe.Sizeof((*byte)(nil)) var x [ptrSize]int func main() { println(ptrSize) println(len(x)) }