- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 532 for overflows (0.18 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/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) -
src/internal/types/testdata/check/expr0.go
b14 = ~ /* ERROR "cannot use ~ outside of interface or type constraint" */ b0 // byte _ = byte(0) _ = byte(- /* ERROR "overflows" */ 1) _ = - /* ERROR "-byte(1) (constant -1 of type byte) overflows byte" */ byte(1) // test for issue 11367 _ = byte /* ERROR "overflows byte" */ (0) - byte(1) _ = ~ /* ERROR "cannot use ~ outside of interface or type constraint (use ^ for bitwise complement)" */ byte(0) // int i0 = 1
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 31 16:11:16 UTC 2023 - 4.4K bytes - Viewed (0) -
src/go/types/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: Wed Apr 03 18:48:38 UTC 2024 - 7.6K bytes - Viewed (0) -
src/math/hypot.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package math /* Hypot -- sqrt(p*p + q*q), but overflows only if the result does. */ // Hypot returns [Sqrt](p*p + q*q), taking care to avoid // unnecessary overflow and underflow. // // Special cases are: // // Hypot(±Inf, q) = +Inf // Hypot(p, ±Inf) = +Inf // Hypot(NaN, q) = NaN // Hypot(p, NaN) = NaN
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 11:59:09 UTC 2023 - 850 bytes - Viewed (0) -
src/go/types/gcsizes.go
// all remaining offsets are too large offsets[i] = -1 continue } // offs >= 0 a := s.Alignof(f.typ) offs = align(offs, a) // possibly < 0 if align overflows offsets[i] = offs if d := s.Sizeof(f.typ); d >= 0 && offs >= 0 { offs += d // ok to overflow to < 0 } else { offs = -1 // f.typ or offs is too large } } return offsets } func (s *gcSizes) Sizeof(T Type) int64 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 4.4K bytes - Viewed (0)