On 17/11/2015 17:02, Joseph Myers wrote: > On Tue, 17 Nov 2015, Paolo Bonzini wrote: > >> * it doesn't promise that GCC will never rely on undefined behavior >> rules for signed left shifts > > 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).
... hmm, are you sure? None of the following warn for me int x = -1 << 2; int y = 1 << 31; int z = 2 << 31; I tried with any combination of -ansi, -pedantic, -std=cXX, -fsanitize=undefined. Paolo