Summary: | Support C++11 static_assert | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Allan Sandfeld Jensen <allan.jensen> | ||||||||
Component: | Web Template Framework | Assignee: | Allan Sandfeld Jensen <allan.jensen> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | andersca, ap, benjamin, cmarcelo, ojan.autocc, webkit.review.bot, zan | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Allan Sandfeld Jensen
2013-03-26 07:20:28 PDT
Created attachment 195083 [details]
Patch
Comment on attachment 195083 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=195083&action=review > Source/WTF/wtf/Assertions.h:348 > #if COMPILER_SUPPORTS(C_STATIC_ASSERT) > #define COMPILE_ASSERT(exp, name) _Static_assert((exp), #name) I think that this should have a comment explaining why we still have this: // Unlike static_assert below, this also works in plain C code. That said, I'm unsure if we ever use - or want to use - COMPILE_ASSERT in plain C code. > Source/WTF/wtf/Compiler.h:128 > +#define WTF_COMPILER_SUPPORTS_CXX_STATIC_ASSERT 1 Shouldn't this be defined for clang too? The behavior in this patch would not be affected, but it's better to not leave such a tripmine for later IMO. Created attachment 195266 [details]
Patch
Added detection of C++11 static_assert to clang, and C11 _Static_assert to GCC.
Created attachment 195267 [details]
Patch
Remove accidentially uploaded change.
Comment on attachment 195267 [details] Patch Clearing flags on attachment: 195267 Committed r146993: <http://trac.webkit.org/changeset/146993> All reviewed patches have been landed. Closing bug. |