diff options
author | Duncan Sands <baldrick@free.fr> | 2010-10-12 14:07:59 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2010-10-12 14:07:59 +0000 |
commit | 240a020bed4a58c3e2e894ad4a3dd31ee3147c9f (patch) | |
tree | c1be76d89efe2f8b1619c5d6963d2151c9789008 /lib/Sema/SemaDecl.cpp | |
parent | cf2e5063ae7e7ed3f8d86bb426b2208e242128ab (diff) |
Pacify gcc-4.4.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116300 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 424e6d19a4..7f844056a3 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -7217,8 +7217,10 @@ void Sema::ActOnEnumBody(SourceLocation EnumLoc, SourceLocation LBraceLoc, if (Enum->isFixed()) { BestType = BestPromotionType = Enum->getIntegerType(); - // We don't set BestWidth, because BestType is going to be the - // type of the enumerators. + // We don't need to set BestWidth, because BestType is going to be the type + // of the enumerators, but we do anyway because otherwise some compilers + // warn that it might be used uninitialized. + BestWidth = CharWidth; } else if (NumNegativeBits) { // If there is a negative value, figure out the smallest integer type (of |