Undefined behaviour in hotspot
david.r.chase at oracle.com
Tue Apr 22 12:20:17 UTC 2014
I'm pretty sure that -Wstrict-overflow is the one that we want,
and that to do this study we (we?) would compile with
but not -fwrapv and not -fno-strict-overflow.
-Wno-error is so you'll get to see all of them.
The flags are discussed here:
On 2014-04-21, at 2:30 PM, Omair Majid <omajid at redhat.com> wrote:
> My knowledge of C/C++ is fairly limited, so please bear with me. There
> are a few relevant options already listed in 'man gcc':
> This option is only active when -fstrict-overflow is active.
> It warns about cases where the compiler optimizes based on
> the assumption that signed overflow does not occur
> This option instructs the compiler to assume that signed
> arithmetic overflow of addition, subtraction and
> multiplication wraps around using twos-complement
> Do you mean others?
More information about the hotspot-dev