diff options
author | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-03-13 17:51:05 +0000 |
---|---|---|
committer | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-03-13 17:51:05 +0000 |
commit | 9c28fa5579734129f1bad026b8b6aea3bf76da5f (patch) | |
tree | d2d4a75fb040469a83cd07b92be9ad1186057bc9 /include | |
parent | addcddeda699216395e3cbd2c53835fdbd4cf5c6 (diff) |
Add comment for gcc compiler bug work-around for SK_COMPILE_ASSERT.
If this comment had existed previously, I could have avoided breaking
some bots.
R=bsalomon@google.com
Review URL: https://codereview.chromium.org/196473013
git-svn-id: http://skia.googlecode.com/svn/trunk@13793 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkTypes.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h index ca91fff060..b0a4731fd4 100644 --- a/include/core/SkTypes.h +++ b/include/core/SkTypes.h @@ -129,6 +129,10 @@ struct SkCompileAssert { // Uses static_cast<bool>(expr) instead of bool(expr) due to // https://connect.microsoft.com/VisualStudio/feedback/details/832915 + +// The extra parentheses in SkCompileAssert<(...)> are a work around for +// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57771 +// which was fixed in gcc 4.8.2. #define SK_COMPILE_ASSERT(expr, msg) \ typedef SkCompileAssert<(static_cast<bool>(expr))> \ msg[static_cast<bool>(expr) ? 1 : -1] SK_UNUSED |