Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2218)

Unified Diff: base/strings/safe_sprintf.cc

Issue 98403005: Disable kSSizeMaxConst COMPILE_ASSERT() for Android / Mac / IOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable for Mac / Android / IOS instead of clang Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/strings/safe_sprintf.cc
diff --git a/base/strings/safe_sprintf.cc b/base/strings/safe_sprintf.cc
index 2d4d93c947bd0514ce4ac8e45c1f1bdbabbf3884..0d97f633f15daea34918bb83689e1b35bfbf1712 100644
--- a/base/strings/safe_sprintf.cc
+++ b/base/strings/safe_sprintf.cc
@@ -108,10 +108,10 @@ class Buffer {
size_(size - 1), // Account for trailing NUL byte
count_(0) {
// This test should work on all C++11 compilers, but apparently something is
-// not working on all versions of clang just yet (e.g. on Mac, IOS, and
-// Android). We are conservative and exclude all of clang for the time being.
+// not working on all versions of clang / gcc just yet (e.g. on Mac, IOS, and
+// Android). We exclude those platforms for now.
// TODO(markus): Check if this restriction can be lifted.
-#if __cplusplus >= 201103 && !defined(__clang__)
+#if __cplusplus >= 201103 && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_IOS)
COMPILE_ASSERT(kSSizeMaxConst == std::numeric_limits<ssize_t>::max(),
Inactive 2013/12/06 22:18:10 Note that on Linux desktop, gcc does complain abou
Nico 2013/12/06 22:21:45 It should be safe to cast std::numeric_limits<ssiz
kSSizeMax_is_the_max_value_of_an_ssize_t);
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698