]> granicus.if.org Git - clang/commitdiff
Fix a compilation warning with gcc 4.6
authorEli Bendersky <eliben@google.com>
Tue, 18 Dec 2012 18:53:14 +0000 (18:53 +0000)
committerEli Bendersky <eliben@google.com>
Tue, 18 Dec 2012 18:53:14 +0000 (18:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170440 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGRecordLayoutBuilder.cpp

index 43088b4a2019fb6b0d49af6235e29b7fd651c7d9..90c338702961f582b0ed9dde9f2a25206789fb4e 100644 (file)
@@ -1088,7 +1088,7 @@ CGRecordLayout *CodeGenTypes::ComputeRecordLayout(const RecordDecl *D,
              "Storage size does not match the element type size");
     }
     assert(Info.Size > 0 && "Empty bitfield!");
-    assert(Info.Offset + Info.Size <= Info.StorageSize &&
+    assert(static_cast<unsigned>(Info.Offset) + Info.Size <= Info.StorageSize &&
            "Bitfield outside of its allocated storage");
   }
 #endif