[webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?
rniwa at webkit.org
Thu Sep 12 20:55:20 PDT 2013
On Thu, Sep 12, 2013 at 8:46 PM, Filip Pizlo <fpizlo at apple.com> wrote:
> On Sep 12, 2013, at 7:54 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:
> Hm... it appears that I was wrong about this. It appears that this is the
> intended feature in gcc:
> Yuck! Madness!
> Regardless, I don't think we should have this warning enabled. We're
> generating some unused code everywhere :(
> Yes, we could say that the warning is disabled in gcc and enabled in
> clang. I'm not sure that's fair, though. We do all sorts of strange
> things to silence clang sometimes; it's only fair that once in a while we
> do things to silence gcc. So unless we say that WebKit should only be
> developed on clang, we should probably agree to sometimes silence gcc's
I think we should move away from doing bizarre things to silence warnings
in gcc & clang. In this particular case, we're probably generating
significantly more code just to silence it.
I'm fine with adding a new macro like UNREACHED_RETURN() but that would
mean that any port using gcc will end up having dead code, potentially
bloating the binary size a lot.
- R. Niwa
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev