[PATCH] Eliminate GCC warning about use of enum, non-enum in ternary operator.

Douglas Katzman dougk at google.com
Fri May 8 13:20:51 PDT 2015


Hi uweigand,

http://reviews.llvm.org/D9619

Files:
  lib/Target/SystemZ/SystemZISelLowering.cpp

Index: lib/Target/SystemZ/SystemZISelLowering.cpp
===================================================================
--- lib/Target/SystemZ/SystemZISelLowering.cpp
+++ lib/Target/SystemZ/SystemZISelLowering.cpp
@@ -2171,14 +2171,14 @@
 
   case ISD::SETOGE:
   case ISD::SETGE:
-    return IsFP ? SystemZISD::VFCMPHE : 0;
+    return IsFP ? (unsigned)SystemZISD::VFCMPHE : 0;
 
   case ISD::SETOGT:
   case ISD::SETGT:
     return IsFP ? SystemZISD::VFCMPH : SystemZISD::VICMPH;
 
   case ISD::SETUGT:
-    return IsFP ? 0 : SystemZISD::VICMPHL;
+    return IsFP ? 0 : (unsigned)SystemZISD::VICMPHL;
 
   default:
     return 0;

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9619.25364.patch
Type: text/x-patch
Size: 630 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150508/7b505858/attachment.bin>


More information about the llvm-commits mailing list