# Compiling to eliminate overflows with 0.31.0

**URL:** <https://forum.crystal-lang.org/t/compiling-to-eliminate-overflows-with-0-31-0/1157>\
**Category:** Help & Support\
**Created:** [September 24, 2019, 9:29pm UTC](https://forum.crystal-lang.org/t/compiling-to-eliminate-overflows-with-0-31-0/1157 "2019-09-24T21:29:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jzakiya](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/jzakiya/32/278_2.png) [@jzakiya](https://forum.crystal-lang.org/u/jzakiya)\
**Post date:** [September 24, 2019, 9:29pm UTC](https://forum.crystal-lang.org/t/compiling-to-eliminate-overflows-with-0-31-0/1157/1 "2019-09-24T21:29:32Z")

</div>

Observed a run time overflow, after getting modified old code to compile with new 0.31.0.

I saw in the blogpost, that

> **[Crystal 0.31.0 released!](https://crystal-lang.org/2019/09/23/crystal-0.31.0-released.html)**
>
> Crystal 0.31.0 has been released!

```auto
If the new default behavior is blocking you, use -Ddisable_overflow to 
keep the same semantics as in 0.30 or -Dskip_crystal_compiler_rt to 
not include out compiler-rt port and link against another build of it. The 
disable_overflow flag is temporal and it will go away. Read more at #8170.

```

I tried that, and all I get is `unknown command` error.

Can you give examples of how to use the commands correctly to turn off new overflow check.

---

<div class="post-metadata">

**Author:** ![asterite](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/asterite/32/60_2.png) [@asterite](https://forum.crystal-lang.org/u/asterite)\
**Post date:** [September 24, 2019, 9:51pm UTC](https://forum.crystal-lang.org/t/compiling-to-eliminate-overflows-with-0-31-0/1157/2 "2019-09-24T21:51:24Z")

</div>

`crystal build program.cr -Ddisable_overflow`

or

`crystal build -Ddisable_overflow program.cr`

or

`crystal program.cr -Ddisable_overflow`

but NOT:

`crystal -Ddisable_overflow build program.cr`

NOR:

`crystal -Ddisable_overflow program.cr`

because the first argument to `crystal` is the command (which is probably the error you are getting)

---

<div class="post-metadata">

**Author:** ![jzakiya](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/jzakiya/32/278_2.png) [@jzakiya](https://forum.crystal-lang.org/u/jzakiya)\
**Post date:** [September 25, 2019, 12:48am UTC](https://forum.crystal-lang.org/t/compiling-to-eliminate-overflows-with-0-31-0/1157/3 "2019-09-25T00:48:47Z")

</div>

Thank you!

Not only did that eliminate the run time overflows, all my benchmarks run faster now than before compiling without overflow checks. The 0.31.0 version is now generally all around faster than with 0.30.x.

When I get a chance I’ll play with using multi-threading. I have a perfect numerical algorithm for that.
