On Mon, 12 Nov 2018 at 04:57, leon zadorin wrote: > Moreover, Clang seems to be the odd one out as VisualC++(2017) also appears > to build/run ok... but I could be trippin... perhaps the code above has a > bug leading to undefined behavior which eventuates in segfault in Clang but > happens to be coincidentally tolerated by GCC? Or is the code valid? It looks like a Clang bug. (There's also a GCC bug, which is that the code is incorrectly rejected when using -fsanitize=undefined).