[PATCH] Fix 1 << 31
Tim Northover
t.p.northover at gmail.com
Mon Dec 2 23:44:38 PST 2013
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.
================
Comment at: include/llvm-c/Core.h:162
@@ -161,3 +161,3 @@
LLVMUWTable = 1 << 30,
- LLVMNonLazyBind = 1 << 31
+ LLVMNonLazyBind = 1U << 31
----------------
This one's apparently also undefined in C ("enumeration constant shall be an integer constant expression that has a value representable as an int").
http://llvm-reviews.chandlerc.com/D2309
More information about the llvm-commits
mailing list