Files
Nim/compiler
ringabout 08d51e5c88 fixes #7179; Floats are not range checked (#25050)
fixes #7179


```nim
var f = 751.0
echo f.int8
```

In this case, `int8(float)` yields different numbers for different
optimization levels, since float to int conversions are undefined
behaviors. In this PR, it mitigates this problem by conversions to same
size integers before converting to the final type: i.e.
`int8(int64(float))`, which has UB problems but is better than before
2025-07-18 21:30:50 +02:00
..
2023-12-15 10:20:57 +01:00
2025-07-13 07:56:20 +02:00
2017-01-07 22:35:09 +01:00
2025-05-11 06:40:46 +02:00
2025-05-27 11:45:28 +02:00
2024-12-27 19:42:18 +01:00
2021-01-12 09:36:51 +01:00
2024-10-29 08:01:44 +01:00
2023-07-02 22:36:05 +02:00
2023-11-06 18:33:28 +01:00
2024-03-16 08:35:18 +08:00
2023-12-25 07:12:54 +01:00

Nim Compiler

  • This directory contains the Nim compiler written in Nim.
  • Note that this code has been translated from a bootstrapping version written in Pascal.
  • So the code is not a poster child of good Nim code.

See Internals of the Nim Compiler for more information.