On 2014-04-24 22:04:40 +0300, Shachar Shemesh wrote:
> Following the discussion from a few days ago about Cava (C like language
> with no undefined behavior), gcc 4.9 is now out[1]. One of the changes
> there is a runtime check for undefined behavior. Just compile with
> -fsanitize=undefined, and your program will crash with log if it
> performs an operation that C/C++ considers to be undefined.

Not exactly. It will just output a diagnostic. You need gcc-snapshot
to use the no-recover option (like clang). Note also that it doesn't
check all UB's, e.g. not uninitialized variables... like clang.

I tried it on GNU MPFR a few days ago and everything was fine.

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140427163120.ga8...@ioooi.vinc17.net

Reply via email to