On 17 November 2015 at 17:45, Paolo Bonzini <pbonz...@redhat.com> wrote: > In the meanwhile I got some good news from the GCC folks: > >>> I think we should remove the ", but this is subject to change" in >>> implement-c.texi (while replacing it with noting that ubsan will still >>> diagnose such cases, and they will also be diagnosed where constant >>> expressions are required).
That doesn't seem like more than half-good news to me. In particular, if ubsan is still diagnosing these cases and they're still a problem in some constant expressions then it is not true that -fwrapv means "shifts of negative numbers etc are well defined and valid in this dialect of C". If the GCC folks don't want to go any further than that then I think we should prefer to avoid this UB. (And there's still the question of clang's position on this.) thanks -- PMM