[webkit-dev] Heads up: FALLTHROUGH annotations for switches with fallthroughs

2014-01-26 Thread Joseph Pecoraro
Hello! I'm slowly enabling -Wimplicit-fallthrough on projects in the Mac / iOS ports. http://trac.webkit.org/changeset/162793 http://clang.llvm.org/docs/LanguageExtensions.html#the-clang-fallthrough-attribute This means that if you write any switch statements with implicit fallthroughs it will

Re: [webkit-dev] Heads up: FALLTHROUGH annotations for switches with fallthroughs

2014-01-26 Thread Brady Eidson
I like this! Out of curiosity, will it be needed for cases like: switch (input) { case 1: // fallthrough? case 2: // Handle both 1 and 2 break; default: // default } Thanks, ~Brady On Jan 26, 2014, at 1:41 AM, Joseph Pecoraro pecor...@apple.com wrote: Hello! I'm slowly

Re: [webkit-dev] Heads up: FALLTHROUGH annotations for switches with fallthroughs

2014-01-26 Thread Joseph Pecoraro
Nope! If there is no statement between case labels, there will be no warning. Follow the link for a more complete description of cases: http://clang.llvm.org/docs/LanguageExtensions.html#the-clang-fallthrough-attribute - Joe On Jan 26, 2014, at 10:23 AM, Brady Eidson beid...@apple.com wrote: