Bug 173385

Summary: Implement FALLTHROUGH macro for compilers other than Clang
Product: WebKit Reporter: Konstantin Tokarev <annulen>
Component: Web Template FrameworkAssignee: Konstantin Tokarev <annulen>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, benjamin, buildbot, cdumez, cmarcelo, darin, dbates, joepeck, mcatanzaro
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Konstantin Tokarev 2017-06-14 14:36:47 PDT
FALLTHROUGH should be able to use [[gnu::fallthrough]] attribute of GCC, and [[fallthrough]] from C++17, whichever is available.
Comment 1 Konstantin Tokarev 2017-06-14 14:39:11 PDT
Created attachment 312921 [details]
Patch
Comment 2 Build Bot 2017-06-14 14:40:22 PDT
Attachment 312921 [details] did not pass style-queue:


ERROR: Source/WTF/wtf/Compiler.h:208:  Extra space before [.  [whitespace/brackets] [5]
ERROR: Source/WTF/wtf/Compiler.h:212:  Extra space before [.  [whitespace/brackets] [5]
Total errors found: 2 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Michael Catanzaro 2017-06-14 20:28:11 PDT
Comment on attachment 312921 [details]
Patch

All the EWS bots are red, fix it please:

In file included from ../../Source/WTF/wtf/Platform.h:32:0,
                 from ../../Source/WTF/wtf/ExportMacros.h:32,
                 from ../../Source/JavaScriptCore/runtime/JSExportMacros.h:32,
                 from ../../Source/JavaScriptCore/config.h:26,
                 from /home/ews/ltilve-gtk-wk2-ews/WebKit/Source/JavaScriptCore/disassembler/udis86/udis86_decode.c:27:
../../Source/WTF/wtf/Compiler.h:209:32: error: missing ')' after "__has_attribute"
 #elif __has_cpp_attribute(clang::fallthrough)
                                ^
../../Source/WTF/wtf/Compiler.h:209:33: error:  ':' without preceding '?'
 #elif __has_cpp_attribute(clang::fallthrough)
                                 ^
../../Source/WTF/wtf/Compiler.h:211:30: error: missing ')' after "__has_attribute"
 #elif __has_cpp_attribute(gnu::fallthrough)
                              ^
../../Source/WTF/wtf/Compiler.h:211:31: error:  ':' without preceding '?'
 #elif __has_cpp_attribute(gnu::fallthrough)
                               ^
Comment 4 Konstantin Tokarev 2017-06-15 01:48:48 PDT
Created attachment 312960 [details]
Patch
Comment 5 Build Bot 2017-06-15 01:54:20 PDT
Attachment 312960 [details] did not pass style-queue:


ERROR: Source/WTF/wtf/Compiler.h:208:  Extra space before [.  [whitespace/brackets] [5]
ERROR: Source/WTF/wtf/Compiler.h:212:  Extra space before [.  [whitespace/brackets] [5]
Total errors found: 2 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Konstantin Tokarev 2017-06-15 09:14:23 PDT
Comment on attachment 312960 [details]
Patch

Clearing flags on attachment: 312960

Committed r218333: <http://trac.webkit.org/changeset/218333>
Comment 7 Konstantin Tokarev 2017-06-15 09:14:28 PDT
All reviewed patches have been landed.  Closing bug.