mirror of
https://github.com/vlang/v.git
synced 2025-09-15 23:42:28 +03:00
checker: check int overflow for const vars (#16332)
This commit is contained in:
parent
d701cf561c
commit
ca484430e0
12 changed files with 87 additions and 62 deletions
|
@ -3,7 +3,7 @@ module constants
|
|||
// Commonly used constants across RNGs - some taken from "Numerical Recipes".
|
||||
pub const (
|
||||
lower_mask = u64(0x00000000FFFFFFFF)
|
||||
max_u32 = 0xFFFFFFFF
|
||||
max_u32 = u32(0xFFFFFFFF)
|
||||
max_u64 = u64(0xFFFFFFFFFFFFFFFF)
|
||||
max_u32_as_f32 = f32(max_u32) + 1
|
||||
max_u64_as_f64 = f64(max_u64) + 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue