- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 41 for Alignof1 (0.12 sec)
-
test/fixedbugs/issue4654.go
defer append(x, 1) // ERROR "defer discards result of append|is not used" defer append(x, 1) // ERROR "defer discards result of append|is not used" defer unsafe.Alignof(t.X) // ERROR "defer discards result of unsafe.Alignof|is not used" defer unsafe.Offsetof(t.X) // ERROR "defer discards result of unsafe.Offsetof|is not used" defer unsafe.Sizeof(t) // ERROR "defer discards result of unsafe.Sizeof|is not used"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 2.7K bytes - Viewed (0) -
test/fixedbugs/issue4463.go
complex(1, 2) // ERROR "not used" imag(1i) // ERROR "not used" len(a) // ERROR "not used" make([]int, 10) // ERROR "not used" new(int) // ERROR "not used" real(1i) // ERROR "not used" unsafe.Alignof(a) // ERROR "not used" unsafe.Offsetof(s.f) // ERROR "not used" unsafe.Sizeof(a) // ERROR "not used" close(c) copy(a, a) delete(m, 0) panic(0) print("foo") println("bar") recover()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 2.4K bytes - Viewed (0) -
src/cmd/compile/internal/types2/builtins_test.go
{"Add", `_ = unsafe.Add(nil, 0)`, `func(unsafe.Pointer, int) unsafe.Pointer`}, {"Alignof", `_ = unsafe.Alignof(0)`, `invalid type`}, // constant {"Alignof", `var x struct{}; _ = unsafe.Alignof(x)`, `invalid type`}, // constant {"Alignof", `var x P; _ = unsafe.Alignof(x)`, `func(P) uintptr`}, {"Offsetof", `var x struct{f bool}; _ = unsafe.Offsetof(x.f)`, `invalid type`}, // constant
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 20 18:06:31 UTC 2024 - 10.8K bytes - Viewed (0) -
src/go/types/builtins_test.go
{"Add", `_ = unsafe.Add(nil, 0)`, `func(unsafe.Pointer, int) unsafe.Pointer`}, {"Alignof", `_ = unsafe.Alignof(0)`, `invalid type`}, // constant {"Alignof", `var x struct{}; _ = unsafe.Alignof(x)`, `invalid type`}, // constant {"Alignof", `var x P; _ = unsafe.Alignof(x)`, `func(P) uintptr`}, {"Offsetof", `var x struct{f bool}; _ = unsafe.Offsetof(x.f)`, `invalid type`}, // constant
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 10.9K bytes - Viewed (0) -
src/internal/types/testdata/fixedbugs/issue40301.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 02 02:58:32 UTC 2022 - 256 bytes - Viewed (0) -
test/typeparam/issue53390.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Jun 18 00:48:50 UTC 2022 - 334 bytes - Viewed (0) -
test/fixedbugs/issue7525e.go
// license that can be found in the LICENSE file. // Issue 7525: self-referential array types. package main import "unsafe" var x struct { // GC_ERROR "initialization cycle: x refers to itself" c [unsafe.Alignof(x.c)]int // GCCGO_ERROR "array bound|typechecking loop|invalid array"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 29 14:21:33 UTC 2022 - 413 bytes - Viewed (0) -
src/cmd/internal/src/xpos_test.go
} if tab.baseList[0] != nil || tab.indexMap[nil] != 0 { t.Errorf("nil base not at index 0") } } func TestSize(t *testing.T) { var p XPos if unsafe.Alignof(p) != 4 { t.Errorf("alignment = %v; want 4", unsafe.Alignof(p)) } if unsafe.Sizeof(p) != 8 { t.Errorf("size = %v; want 8", unsafe.Sizeof(p)) } } func TestSetBase(t *testing.T) { var tab PosTable b1 := NewFileBase("b1", "b1")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 01 15:52:41 UTC 2023 - 2.7K bytes - Viewed (0) -
test/sizeof.go
type T2 struct { A int32 U2 } type U2 struct { B int32 C int32 } var t2 T2 var p2 *T2 func main() { // Test unsafe.Sizeof, unsafe.Alignof, and unsafe.Offsetof all return uintptr. isUintptr(unsafe.Sizeof(t)) isUintptr(unsafe.Alignof(t)) isUintptr(unsafe.Offsetof(t.X)) // Test correctness of Offsetof with respect to embedded fields (issue 4909). if unsafe.Offsetof(t2.C) != 8 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 2.9K bytes - Viewed (0) -
test/typeparam/issue48094.dir/a.go
// license that can be found in the LICENSE file. package a import "unsafe" func F[T any]() uintptr { var t T return unsafe.Sizeof(t) } func G[T any]() uintptr { var t T return unsafe.Alignof(t) } //func H[T any]() uintptr { // type S struct { // a T // b T // } // var s S // return unsafe.Offsetof(s.b)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 31 17:21:38 UTC 2021 - 429 bytes - Viewed (0)