Hardware Traps for Integer Overflow
bearophile via Digitalmars-d
digitalmars-d at puremagic.com
Thu May 29 08:01:02 PDT 2014
A request for hardware overflow tests:
http://blog.regehr.org/archives/1154
From the blog post:
>Processors should support integer math instructions that
>optionally trap on overflow. Because popular architectures lack
>this feature, otherwise excellent modern systems programming
>languages, such as Rust, Go, and D, have default integer types
>that wrap.<
>This post isn’t as much of an opinion piece as a plea to the
>folks at ARM, Intel, and AMD: Please provide this feature. It is
>needed in order to make high-level languages faster and
>low-level languages saner.<
From the comments:
>I’ve grown to dislike unsigned types but agree that they are a
>perfectly valid design point in a language that avoids the
>serious problems with implicit coercion that C/C++ have. Rust
>gets unsigned right, for example.<
Bye,
bearophile
More information about the Digitalmars-d
mailing list