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

Issue 98403005: Disable kSSizeMaxConst COMPILE_ASSERT() for Android / Mac / IOS (Closed)

Created:
7 years ago by Inactive
Modified:
7 years ago
CC:
chromium-reviews, erikwright+watch_chromium.org, jshin+watch_chromium.org, willchan no longer on Chromium
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Disable kSSizeMaxConst COMPILE_ASSERT() for Android / Mac / IOS The kSSizeMaxConst COMPILE_ASSERT() was previously disabled for clang only, due to clang giving a build error on Android / Mac / IOS. gcc is affected by the same problem so this CL disables the COMPILE_ASSERT() for Android / Mac / IOS platforms, instead of doing it for a specific compiler. The reason why this COMPILE_ASSERT() does not build on those platforms is that static_assert only works with compile-time constants, but mac uses libstdc++4.2 and android uses stlport, which both don't mark numeric_limits::max() as constexpr. R=Nico Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=239352

Patch Set 1 #

Patch Set 2 : Disable for Mac / Android / IOS instead of clang #

Total comments: 2

Patch Set 3 : Update comment and add cast #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -6 lines) Patch
M base/strings/safe_sprintf.cc View 1 2 1 chunk +7 lines, -6 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Inactive
7 years ago (2013-12-06 19:38:03 UTC) #1
Nico
This looks wrong. It's failing with clang because we use libstdc++ 4.2 with it on ...
7 years ago (2013-12-06 21:23:35 UTC) #2
Inactive
On 2013/12/06 21:23:35, Nico wrote: > This looks wrong. It's failing with clang because we ...
7 years ago (2013-12-06 21:33:42 UTC) #3
Nico
Oh, that's probably because Android builds with stlport which also doesn't have a constexpr max(). ...
7 years ago (2013-12-06 21:57:11 UTC) #4
Inactive
On 2013/12/06 21:57:11, Nico wrote: > Oh, that's probably because Android builds with stlport which ...
7 years ago (2013-12-06 22:14:45 UTC) #5
Nico
Can you please update the comment with the actual reason, instead of "something doesn't work"? ...
7 years ago (2013-12-06 22:17:05 UTC) #6
Inactive
https://codereview.chromium.org/98403005/diff/20001/base/strings/safe_sprintf.cc File base/strings/safe_sprintf.cc (right): https://codereview.chromium.org/98403005/diff/20001/base/strings/safe_sprintf.cc#newcode115 base/strings/safe_sprintf.cc:115: COMPILE_ASSERT(kSSizeMaxConst == std::numeric_limits<ssize_t>::max(), Note that on Linux desktop, gcc ...
7 years ago (2013-12-06 22:18:10 UTC) #7
Nico
https://codereview.chromium.org/98403005/diff/20001/base/strings/safe_sprintf.cc File base/strings/safe_sprintf.cc (right): https://codereview.chromium.org/98403005/diff/20001/base/strings/safe_sprintf.cc#newcode115 base/strings/safe_sprintf.cc:115: COMPILE_ASSERT(kSSizeMaxConst == std::numeric_limits<ssize_t>::max(), On 2013/12/06 22:18:10, Chris Dumez wrote: ...
7 years ago (2013-12-06 22:21:45 UTC) #8
Inactive
On 2013/12/06 22:21:45, Nico wrote: > https://codereview.chromium.org/98403005/diff/20001/base/strings/safe_sprintf.cc > File base/strings/safe_sprintf.cc (right): > > https://codereview.chromium.org/98403005/diff/20001/base/strings/safe_sprintf.cc#newcode115 > ...
7 years ago (2013-12-06 22:37:17 UTC) #9
Nico
lgtm if the trybots are happy :-)
7 years ago (2013-12-06 22:40:12 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/98403005/40001
7 years ago (2013-12-07 02:15:24 UTC) #11
commit-bot: I haz the power
7 years ago (2013-12-07 22:11:06 UTC) #12
Message was sent while issue was closed.
Change committed as 239352

Powered by Google App Engine
This is Rietveld 408576698