[Webkit-unassigned] [Bug 127637] Add FALLTHROUGH and -Wimplicit-fallthrough to warn about unannotated implicit fallthroughs in switches

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jan 25 18:32:46 PST 2014


https://bugs.webkit.org/show_bug.cgi?id=127637


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #222243|review?                     |review+
               Flag|                            |




--- Comment #5 from Darin Adler <darin at apple.com>  2014-01-25 18:30:13 PST ---
(From update of attachment 222243)
View in context: https://bugs.webkit.org/attachment.cgi?id=222243&action=review

> Source/WTF/wtf/Compiler.h:159
> +#if !defined(FALLTHROUGH) && COMPILER_SUPPORTS(FALLTHROUGH_WARNINGS)
> +#if COMPILER(CLANG)

Should just be a single #if with another && in it.

> Source/WTF/wtf/Compiler.h:165
> +#define FALLTHROUGH do { } while (false)

Can this just be defined to nothing? I wouldn’t think it needs to be a statement (see my comments below about semicolons).

> Source/WTF/wtf/dtoa/fast-dtoa.cc:257
> +                FALLTHROUGH;

Does this really require a semicolon after it? That doesn’t seem quite right to me, but maybe that’s how the clang feature works?

I don’t think we should keep the "// else fallthrough" comments since we are adding the FALLTHROUGH macros, which say the same thing.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list