On Sep 13, 2013, at 10:31 AM, Oliver Hunt <oli...@apple.com> wrote:

> We may want to hunt through the other cases of default: ASSERT_NOT_REACHED() 
> and clobber those with RELEASE_ASSERT_NOT_REACHED() as well.
> 
> I wonder if it would be easier to have DEFAULT_NOT_REACHED() and 
> DEFAULT_OKAY() macros, and convince the style bot to require ether a default: 
> block or one of these two macros at the end of every switch?


Maybe.

The advantage of doing the not-reached assertion after the switch is that we 
get the compile time warning if we don’t enumerate one of the enum values. 
Having a default case turns that warning off.

-- Darin
_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to