]> granicus.if.org Git - clang/commitdiff
Fix build issue on cygwin, patch by Sam Bishop
authorChris Lattner <sabre@nondot.org>
Mon, 14 Jan 2008 21:47:29 +0000 (21:47 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 14 Jan 2008 21:47:29 +0000 (21:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45977 91177308-0d34-0410-b5e6-96231b3b80d8

Sema/SemaDecl.cpp

index 621e2d98955fbdc58890a2628c149455d9dfb022..ddfde8f44def848b3ffbb830be376ed1c7b7d851 100644 (file)
@@ -1509,9 +1509,11 @@ void Sema::ActOnEnumBody(SourceLocation EnumLoc, DeclTy *EnumDeclX,
     
     // 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)