GCC doesn't like prefix form of cast with two identifiers I guess.
authorChris Lattner <sabre@nondot.org>
Fri, 4 Jun 2004 20:21:53 +0000 (20:21 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 4 Jun 2004 20:21:53 +0000 (20:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14021 91177308-0d34-0410-b5e6-96231b3b80d8

include/Support/StringExtras.h
include/llvm/ADT/StringExtras.h

index 5cbf9b3e338ac4b1a1d0950147e193a9cdc24a87..6b6472954eefc0a4b38d06507922c3fbdad738d4 100644 (file)
@@ -28,7 +28,7 @@ static inline std::string utohexstr(uint64_t X) {
   if (X == 0) *--BufPtr = '0';  // Handle special case...
 
   while (X) {
-    unsigned char Mod = unsigned char(X) & 15;
+    unsigned char Mod = (unsigned char)X & 15;
     if (Mod < 10)
       *--BufPtr = '0' + Mod;
     else
index 5cbf9b3e338ac4b1a1d0950147e193a9cdc24a87..6b6472954eefc0a4b38d06507922c3fbdad738d4 100644 (file)
@@ -28,7 +28,7 @@ static inline std::string utohexstr(uint64_t X) {
   if (X == 0) *--BufPtr = '0';  // Handle special case...
 
   while (X) {
-    unsigned char Mod = unsigned char(X) & 15;
+    unsigned char Mod = (unsigned char)X & 15;
     if (Mod < 10)
       *--BufPtr = '0' + Mod;
     else