[webkit-reviews] review denied: [Bug 27902] Missing default switch for baselineShift case statement : [Attachment 33909] Assert on unhandled values for baselineShift

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 31 17:47:04 PDT 2009


Darin Adler <darin at apple.com> has denied James Hawkins <jhawkins at google.com>'s
request for review:
Bug 27902: Missing default switch for baselineShift case statement
https://bugs.webkit.org/show_bug.cgi?id=27902

Attachment 33909: Assert on unhandled values for baselineShift
https://bugs.webkit.org/attachment.cgi?id=33909&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
By adding the default case, you are turning off the gcc feature that complains
if an enum value is not handled in a switch statement.

So you are turning off compile-time detection (under gcc) of the very thing you
are trying to catch at runtime.

And compile-time detection is even better, so we don't want it turned off!

Please put the assertion outside the switch statement instead of adding a
default case. Or just drop this while thing, since we'll catch missing enum
values immediately due to gcc's warning as soon as this file is compiled with
gcc.


More information about the webkit-reviews mailing list