[cfe-commits] r147067 - /cfe/trunk/lib/AST/ExprConstant.cpp

Matt Beaumont-Gay matthewbg at google.com
Wed Dec 21 11:36:37 PST 2011


Author: matthewbg
Date: Wed Dec 21 13:36:37 2011
New Revision: 147067

URL: http://llvm.org/viewvc/llvm-project?rev=147067&view=rev
Log:
Cast enumerators from different anonymous enums to unsigned, to appease gcc

Modified:
    cfe/trunk/lib/AST/ExprConstant.cpp

Modified: cfe/trunk/lib/AST/ExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=147067&r1=147066&r2=147067&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)
+++ cfe/trunk/lib/AST/ExprConstant.cpp Wed Dec 21 13:36:37 2011
@@ -1150,8 +1150,8 @@
   }
   if (Sub.OnePastTheEnd) {
     Info.Diag(E->getExprLoc(), Info.getLangOpts().CPlusPlus0x ?
-                diag::note_constexpr_read_past_end :
-                diag::note_invalid_subexpr_in_const_expr);
+                (unsigned)diag::note_constexpr_read_past_end :
+                (unsigned)diag::note_invalid_subexpr_in_const_expr);
     return false;
   }
   if (Sub.Entries.empty())
@@ -1170,8 +1170,8 @@
         // Note, it should not be possible to form a pointer with a valid
         // designator which points more than one past the end of the array.
         Info.Diag(E->getExprLoc(), Info.getLangOpts().CPlusPlus0x ?
-                    diag::note_constexpr_read_past_end :
-                    diag::note_invalid_subexpr_in_const_expr);
+                    (unsigned)diag::note_constexpr_read_past_end :
+                    (unsigned)diag::note_invalid_subexpr_in_const_expr);
         return false;
       }
       if (O->getArrayInitializedElts() > Index)





More information about the cfe-commits mailing list