Geert Bosch wrote:
This is completely wrong. Making operations undefined is a two-edged
sword. At the one hand, you can make more assumptions, but there's
also the issue that when you want to rewrite expressions, you have
to be more careful to not introduce undefined behavior when there
was none
On Dec 20, 2006, at 09:38, Bruno Haible wrote:
But the other way around? Without -fwrapv the compiler can assume more
about the program being compiled (namely that signed integer overflows
don't occur), and therefore has more freedom for optimizations. All
optimizations that are possible with -f
> "Paolo" == Paolo Bonzini <[EMAIL PROTECTED]> writes:
>> On Wed, Dec 20, 2006 at 03:50:23PM +, Joseph S. Myers wrote:
>> For signed integers, overflow is undefined, but for unsigned integers,
>> overflow wraps.
Paolo> You mean writing the hypothetical PLUS_WRAP_EXPR (where a and b
Paolo
On Wed, Dec 20, 2006 at 03:50:23PM +, Joseph S. Myers wrote:
Indeed. Fixing this may require it to be possible to mark individual
operations with their overflow semantics (which will also be needed for
LTO to handling inlining between translation units compiled with different
options).
On Wed, 20 Dec 2006, Bruno Haible wrote:
> > But the other way around? Without -fwrapv the compiler can assume more
> > about the program being compiled (namely that signed integer overflows
> > don't occur), and therefore has more freedom for optimizations. All
> > optimizations that are possible
On Wed, 20 Dec 2006, Bruno Haible wrote:
> But the other way around? Without -fwrapv the compiler can assume more
> about the program being compiled (namely that signed integer overflows
> don't occur), and therefore has more freedom for optimizations. All
> optimizations that are possible with -f
Hi,
The gcc docs say:
`-fwrapv'
... This flag enables some optimizations and disables others.
-fwrapv turns some undefined behaviour (according to C99) into well-defined
behaviour, therefore it is obvious that it can disable some optimizations.
But the other way around? Without -fwrapv t