Changeset 219791 in webkit
- Timestamp:
- Jul 23, 2017 2:01:28 PM (7 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r219763 r219791 1 2017-07-23 Michael Catanzaro <mcatanzaro@igalia.com> 2 3 Implement FALLTHROUGH attribute for C with GCC 4 https://bugs.webkit.org/show_bug.cgi?id=174555 5 6 Reviewed by Darin Adler. 7 8 My previous attempt to silence the JSC -Wimplicit-fallthrough warnings failed because they 9 are coming from a C file, and our FALLTHROUGH macro is only implemented for C++. So 10 implement it for C as well, using C attribute syntax. 11 12 Note this is only possible to do for GCC, because Clang only supports this attribute using 13 the [[C++ attribute syntax]]. 14 15 * wtf/Compiler.h: 16 1 17 2017-07-14 Filip Pizlo <fpizlo@apple.com> 2 18 -
trunk/Source/WTF/wtf/Compiler.h
r219244 r219791 213 213 #endif 214 214 215 #elif !defined(FALLTHROUGH) && !defined(__cplusplus) 216 217 #if COMPILER(GCC) 218 #if GCC_VERSION_AT_LEAST(7, 0, 0) 219 #define FALLTHROUGH __attribute__ ((fallthrough)) 220 #endif 221 #endif 222 215 223 #endif // !defined(FALLTHROUGH) && defined(__cplusplus) && defined(__has_cpp_attribute) 216 224
Note: See TracChangeset
for help on using the changeset viewer.