On 1/2/13 9:40 AM, Chris Lattner wrote: > On Jan 2, 2013, at 4:10 AM, Richard Smith <[email protected]> wrote: >> See http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1457 >> >> In C++11, a signed left shift is nuw but not nsw. > > Also, clang intentionally follow's GCC's lead and makes some shift behavior > implementation-defined to be ok: > http://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html#Integers-implementation
You mean clang intentionally leaves out nsw/nuw for signed left shift, right? Thanks for the clarification! I withdraw my patch. :) BTW, looks like GCC 4.8 once exploited this undefined behavior and reverted the change later. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54027 - xi _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
