- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 650 for overflows (0.16 sec)
-
src/internal/types/testdata/check/const1.go
_ = int8(minInt8) _ = int8(maxInt8) _ = int8(maxInt8 /* ERROR "overflows" */ + 1) _ = int8(smallestFloat64 /* ERROR "cannot convert" */) ) const ( _ int16 = minInt16 /* ERROR "overflows" */ - 1 _ int16 = minInt16 _ int16 = maxInt16 _ int16 = maxInt16 /* ERROR "overflows" */ + 1 _ int16 = smallestFloat64 /* ERROR "truncated" */ _ = int16(minInt16 /* ERROR "overflows" */ - 1)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 31 16:11:16 UTC 2023 - 8.5K bytes - Viewed (0) -
src/internal/types/testdata/fixedbugs/issue63563.go
package p var ( _ = int8(1 /* ERROR "constant 255 overflows int8" */ <<8 - 1) _ = int16(1 /* ERROR "constant 65535 overflows int16" */ <<16 - 1) _ = int32(1 /* ERROR "constant 4294967295 overflows int32" */ <<32 - 1) _ = int64(1 /* ERROR "constant 18446744073709551615 overflows int64" */ <<64 - 1) _ = uint8(1 /* ERROR "constant 256 overflows uint8" */ << 8) _ = uint16(1 /* ERROR "constant 65536 overflows uint16" */ << 16)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 31 16:11:16 UTC 2023 - 1.2K bytes - Viewed (0) -
src/internal/types/testdata/spec/range_int.go
} for range maxUint /* ERROR "cannot use maxUint (untyped int constant 18446744073709551615) as int value in range clause (overflows)" */ { } for i := range maxInt { _ = i } for i := range maxInt /* ERROR "cannot use maxInt + 1 (untyped int constant 9223372036854775808) as int value in range clause (overflows)" */ + 1 { _ = i }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 18:56:00 UTC 2024 - 4.7K bytes - Viewed (0) -
src/internal/types/testdata/check/constdecl.go
_ byte = 255 + iota /* some gap */ _ // ERROR "overflows" /* some gap */ /* some gap */ _ /* ERROR "overflows" */; _ /* ERROR "overflows" */ /* some gap */ _ = 255 + iota _ = byte /* ERROR "overflows" */ (255) + iota _ /* ERROR "overflows" */ ) // Test cases from issue. const ( ok = byte(iota + 253) bad barn bard // ERROR "overflows" ) const ( c = len([1 - iota]int{})
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 31 16:11:16 UTC 2023 - 3.7K bytes - Viewed (0) -
src/internal/types/testdata/check/decls1.go
v2 = c + 255 v3 = c + 256 /* ERROR "overflows" */ v4 = r + 2147483647 v5 = r + 2147483648 /* ERROR "overflows" */ v6 = 42 v7 = v6 + 9223372036854775807 v8 = v6 + 9223372036854775808 /* ERROR "overflows" */ v9 = i + 1 << 10 v10 byte = 1024 /* ERROR "overflows" */ v11 = xx/yy*yy - xx v12 = true && false v13 = nil /* ERROR "use of untyped nil" */
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 05 18:13:11 UTC 2024 - 3.8K bytes - Viewed (0) -
src/internal/types/testdata/check/shifts.go
var a []byte _ = a[0xffffffffffffffff /* ERROR "overflows int" */ <<s] // example from issue 22969 _ = make([]int, 0xffffffffffffffff /* ERROR "overflows int" */ << s) _ = make([]int, 0, 0xffffffffffffffff /* ERROR "overflows int" */ << s) var _ byte = 0x100 /* ERROR "overflows byte" */ << s var _ int8 = 0xff /* ERROR "overflows int8" */ << s var _ int16 = 0xffff /* ERROR "overflows int16" */ << s
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:54:27 UTC 2023 - 12.7K bytes - Viewed (0) -
src/internal/types/testdata/check/expr3.go
_ = s[: - /* ERROR "negative" */ 1] _ = s[0] _ = s[1:2] _ = s[2:1 /* ERROR "invalid slice indices" */ ] _ = s[2:] _ = s[: 1 /* ERROR "overflows" */ <<100] _ = s[1 /* ERROR "overflows" */ <<100 :] _ = s[1 /* ERROR "overflows" */ <<100 : 1 /* ERROR "overflows" */ <<100] _ = s[: /* ERROR "middle index required" */ : /* ERROR "final index required" */ ] _ = s[:10:10] _ = s[10:0 /* ERROR "invalid slice indices" */ :10]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 16 22:41:49 UTC 2023 - 15.6K bytes - Viewed (0) -
test/unsafebuiltins.go
// length too large var tooBig uint64 = math.MaxUint64 mustPanic(func() { _ = unsafe.Slice(new(byte), tooBig) }) // size overflows address space mustPanic(func() { _ = unsafe.Slice(new(uint64), maxUintptr/8) }) mustPanic(func() { _ = unsafe.Slice(new(uint64), maxUintptr/8+1) }) // sliced memory overflows address space last := (*byte)(unsafe.Pointer(^uintptr(0))) _ = unsafe.Slice(last, 1)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 31 17:15:15 UTC 2022 - 2.3K bytes - Viewed (0) -
src/cmd/compile/internal/types2/const.go
if isNumeric(x.typ) && isNumeric(typ) { // numeric conversion : error msg // // integer -> integer : overflows // integer -> float : overflows (actually not possible) // float -> integer : truncated // float -> float : overflows // if !isInteger(x.typ) && isInteger(typ) { return nil, TruncatedFloat } else { return nil, NumericOverflow } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 22 19:32:17 UTC 2024 - 7.5K bytes - Viewed (0) -
test/fixedbugs/issue5609.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // issue 5609: overflow when calculating array size package pkg const Large uint64 = 18446744073709551615
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 27 18:59:51 UTC 2023 - 385 bytes - Viewed (0)