[libc-commits] [libc] 1cc7cd4 - [libc] Fix size_t used without including stddef.h in CPP/limit.h. (#78861)

via libc-commits libc-commits at lists.llvm.org
Sat Jan 20 13:14:22 PST 2024


Author: lntue
Date: 2024-01-20T16:14:17-05:00
New Revision: 1cc7cd46a9158e2c254ed72274c69f36f62cf7a3

URL: https://github.com/llvm/llvm-project/commit/1cc7cd46a9158e2c254ed72274c69f36f62cf7a3
DIFF: https://github.com/llvm/llvm-project/commit/1cc7cd46a9158e2c254ed72274c69f36f62cf7a3.diff

LOG: [libc] Fix size_t used without including stddef.h in CPP/limit.h. (#78861)

Added: 
    

Modified: 
    libc/src/__support/CPP/limits.h

Removed: 
    


################################################################################
diff  --git a/libc/src/__support/CPP/limits.h b/libc/src/__support/CPP/limits.h
index e92ad00f80e037..d9e7090a0b7b19 100644
--- a/libc/src/__support/CPP/limits.h
+++ b/libc/src/__support/CPP/limits.h
@@ -20,7 +20,7 @@ namespace cpp {
 
 // Some older gcc distributions don't define these for 32 bit targets.
 #ifndef LLONG_MAX
-constexpr size_t LLONG_BIT_WIDTH = sizeof(long long) * 8;
+constexpr unsigned int LLONG_BIT_WIDTH = sizeof(long long) * 8;
 constexpr long long LLONG_MAX = ~0LL ^ (1LL << (LLONG_BIT_WIDTH - 1));
 constexpr long long LLONG_MIN = 1LL << (LLONG_BIT_WIDTH - 1);
 constexpr unsigned long long ULLONG_MAX = ~0ULL;


        


More information about the libc-commits mailing list