Hi, all.
This weekend I compiled LLVM and clang under Cygwin. I had a problem
compiling both of them for the same reason: Cygwin maps the *int32_t
types to longs instead of ints. I have submitted a fix for LLVM, but
for clang I punted with these heavy-handed casts:
--- SemaDecl.cpp (revision 45943)
+++ SemaDecl.cpp (working copy)
@@ -1502,9 +1502,9 @@
// Keep track of the size of positive and negative values.
if (InitVal.isUnsigned() || !InitVal.isNegative())
- NumPositiveBits = std::max(NumPositiveBits, InitVal.getActiveBits());
+ NumPositiveBits = std::max(NumPositiveBits,
(unsigned)InitVal.getActiveBits());
else
- NumNegativeBits = std::max(NumNegativeBits, InitVal.getMinSignedBits());
+ NumNegativeBits = std::max(NumNegativeBits,
(unsigned)InitVal.getMinSignedBits());
// Keep track of whether every enum element has type int (very commmon).
if (AllElementsInt)
I suspect that someone who knows this code better could come up with a
better fix.
Thanks,
Sam
_______________________________________________
cfe-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev