This is an archive of the discontinued LLVM Phabricator instance.

Fix 1 << 31
AbandonedPublic

Authored by eax on Dec 2 2013, 3:06 PM.

Details

Reviewers
None
Summary

1 << 31 is not legal in C++ prior to C++14

Diff Detail

Event Timeline

Hi Eitan,

Thanks for looking at this, we should definitely get rid of UB wherever we can. There's a slight problem with the patch though, unfortunately.

Cheers.

Tim.

include/llvm-c/Core.h
162

This one's apparently also undefined in C ("enumeration constant shall be an integer constant expression that has a value representable as an int").

eax abandoned this revision.Mar 21 2015, 11:45 PM