From: Eli Bendersky Date: Tue, 18 Dec 2012 18:53:14 +0000 (+0000) Subject: Fix a compilation warning with gcc 4.6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6bd120387a0d36bb5a748d4100b3eaa399eb53c5;p=clang Fix a compilation warning with gcc 4.6 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170440 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGRecordLayoutBuilder.cpp b/lib/CodeGen/CGRecordLayoutBuilder.cpp index 43088b4a20..90c3387029 100644 --- a/lib/CodeGen/CGRecordLayoutBuilder.cpp +++ b/lib/CodeGen/CGRecordLayoutBuilder.cpp @@ -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(Info.Offset) + Info.Size <= Info.StorageSize && "Bitfield outside of its allocated storage"); } #endif