Re: [PATCH v2] Clarify promises about undefined behavior with signed <

2015-11-25 Thread Joseph Myers
On Wed, 25 Nov 2015, Paolo Bonzini wrote: > * doc/implement-c.texi (Integers Implementation): Make GCC's promises > about signed left shift stronger and clarify the cases when they're > broken. OK. -- Joseph S. Myers jos...@codesourcery.com

[PATCH v2] Clarify promises about undefined behavior with signed <

2015-11-25 Thread Paolo Bonzini
GCC's -fwrapv option does not affect code generation for shifts because currently GCC does not rely on the fact that certain signed shifts trigger undefined behavior. However, the definition of signed arithmetic overflow does extend to shifts; it is only code generation that is limited to addition