http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56051



--- Comment #6 from Marc Glisse <glisse at gcc dot gnu.org> 2013-01-20 20:17:31 
UTC ---

(In reply to comment #5)

> Yeah, I'm afraid assuming you never do 1 << 31 is going to break simply way 
> too

> much code in the wild.



I noticed that clang warns for 1 << 31, and with -fsanitize=shift tells you if

there is 1<<n with n==31 in C, but not in C++. And the reason seems to be that

the C++ committee has, in DR1457, retroactively made it legal :-(

(PR52119 also mentions this)

Reply via email to