On Jan 20, 2010, at 2:19 PM, Yong Li wrote:

> As everyone may know, current webkit style (at least for most source code) 
> for a switch statement is like this:
>  
> switch (var) {
> case valueFirst:
>   ...
>   break;
> ...
> case valueLast:
>   ...
>   break;
> default:
>   ASSERT_NOT_REACHED()
> }

That’s not the preferred style. The preferred style (not counting indenting, 
which was only recently standardized) can be seen in functions like 
Node::isContainer. To take advantage of the warning GCC provides to help you 
make sure you cover all values of an enum, we leave out the default whenever 
possible.

Could you give a specific example in today’s WebKit code where a particular 
compiler is emitting a “not reached” warning?

    -- Darin

_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to