Re: [webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?

2013-09-13 Thread Darin Adler
On Sep 13, 2013, at 10:28 AM, Alexey Proskuryakov wrote: > 13 сент. 2013 г., в 10:13, Darin Adler написал(а): > >> Since there’s no runtime guarantee that the enum will have a valid value, I >> think there needs to be a return statement outside the switch, even if we >> have ASSERT_NOT_REACHE

Re: [webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?

2013-09-13 Thread Darin Adler
On Sep 12, 2013, at 2:07 PM, Ryosuke Niwa wrote: > http://trac.webkit.org/changeset/155643 broke Qt build with an error saying: > > Source/JavaScriptCore/dfg/DFGGPRInfo.h:169:5: error: control reaches end of > non-void function [-Werror=return-type] > cc1plus: all warnings being treated as erro

Re: [webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?

2013-09-13 Thread Darin Adler
Can someone make this more concrete by pointing to an example in WebKit where we are getting that warning with gcc, but no warning with clang? -- Darin ___ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/web

Re: [webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?

2013-09-13 Thread Filip Pizlo
On Sep 13, 2013, at 10:33 AM, Darin Adler wrote: > On Sep 13, 2013, at 10:31 AM, Oliver Hunt 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 D

Re: [webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?

2013-09-13 Thread Darin Adler
On Sep 13, 2013, at 10:36 AM, Oliver Hunt wrote: > I guess there's no nice automate-able to handle everything magically. We could require either default: or DEFAULT_NOT_REACHED at ends of switches. To use DEFAULT_NOT_REACHED after a switch the cases need to use return, not break. I’m sure we c

Re: [webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?

2013-09-13 Thread Oliver Hunt
Hurk :-/ I guess there's no nice automate-able to handle everything magically. Still it would probably be good to replace the default:ASSERT_NOT_REACHED() cases at least. --Oliver On Sep 13, 2013, at 10:33 AM, Darin Adler wrote: > On Sep 13, 2013, at 10:31 AM, Oliver Hunt wrote: > >> We ma

Re: [webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?

2013-09-13 Thread Darin Adler
On Sep 13, 2013, at 10:31 AM, Oliver Hunt 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 convi

Re: [webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?

2013-09-13 Thread Oliver Hunt
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

Re: [webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?

2013-09-13 Thread Konstantin Tokarev
13.09.2013, 06:54, "Ryosuke Niwa" : > Hm... it appears that I was wrong about this.  It appears that this is the > intended feature in gcc:http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28236 > > Regardless, I don't think we should have this warning enabled. We're > generating some unused code ever

[webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?

2013-09-12 Thread Ryosuke Niwa
Hi, http://trac.webkit.org/changeset/155643 broke Qt build with an error saying: Source/JavaScriptCore/dfg/DFGGPRInfo.h:169:5: error: control reaches end of non-void function [-Werror=return-type] cc1plus: all warnings being treated as errors because of the following code: GPRReg gpr(WhichValue

Re: [webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?

2013-09-12 Thread Benjamin Poulain
The problem here is Qt uses older compilers which do not detect when all cases are handled before the end of the function (like the example of Ryosuke). It looks like this will not be a problem for much longer. Qt people are giving up on developing a web engine: http://blog.qt.digia.com/blog/

Re: [webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?

2013-09-12 Thread Ryosuke Niwa
On Thu, Sep 12, 2013 at 4:19 PM, Myles C. Maxfield wrote: > I can't speak for Qt, but this warning has been helpful for me in the past. > We have the same warning enabled on Mac, GTK+, etc... and I agree it's useful. The problem here is that the version of gcc used by Qt builders isn't smart en

Re: [webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?

2013-09-12 Thread Myles C. Maxfield
I can't speak for Qt, but this warning has been helpful for me in the past. On Thu, Sep 12, 2013 at 2:07 PM, Ryosuke Niwa wrote: > Hi, > > http://trac.webkit.org/changeset/155643 broke Qt build with an error > saying: > > Source/JavaScriptCore/dfg/DFGGPRInfo.h:169:5: error: control reaches end

Re: [webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?

2013-09-12 Thread Ryosuke Niwa
On Thu, Sep 12, 2013 at 8:46 PM, Filip Pizlo wrote: > > On Sep 12, 2013, at 7:54 PM, Ryosuke Niwa wrote: > > Hm... it appears that I was wrong about this. It appears that this is the > intended feature in gcc: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28236 > > > Yuck! Madness! > > > Regar

Re: [webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?

2013-09-12 Thread Benjamin Poulain
On 9/12/13 8:46 PM, Filip Pizlo wrote: On Sep 12, 2013, at 7:54 PM, Ryosuke Niwa > wrote: Hm... it appears that I was wrong about this. It appears that this is the intended feature in gcc: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28236 Yuck! Madness! Regardle

Re: [webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?

2013-09-12 Thread Filip Pizlo
On Sep 12, 2013, at 7:54 PM, Ryosuke Niwa wrote: > Hm... it appears that I was wrong about this. It appears that this is the > intended feature in gcc: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28236 Yuck! Madness! > > Regardless, I don't think we should have this warning enabled. We'r

Re: [webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?

2013-09-12 Thread Allan Sandfeld Jensen
On Friday 13 September 2013, Benjamin Poulain wrote: > On 9/12/13 4:48 PM, Ryosuke Niwa wrote: > > On Thu, Sep 12, 2013 at 4:45 PM, Allan Sandfeld Jensen > > > > mailto:k...@carewolf.com>> wrote: > > Don't worry we are still here, just in fewer numbers, and with > > fewer things to > >

Re: [webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?

2013-09-12 Thread Anders Carlsson
On Sep 12, 2013, at 4:45 PM, Allan Sandfeld Jensen wrote: > Don't worry we are still here, just in fewer numbers, and with fewer things > to > support. Hi Allan, reading the article it seems to me like Qt WebKit is going into maintenance mode. Is this true? Does this mean that you’ll crea

Re: [webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?

2013-09-12 Thread Ryosuke Niwa
Hm... it appears that I was wrong about this. It appears that this is the intended feature in gcc: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28236 Regardless, I don't think we should have this warning enabled. We're generating some unused code everywhere :( - R. Niwa On Thu, Sep 12, 2013 at

Re: [webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?

2013-09-12 Thread Andreas Kling
On Sep 13, 2013, at 12:45 AM, Allan Sandfeld Jensen wrote: > Don't worry we are still here, just in fewer numbers, and with fewer things > to > support. Can you give us more details on what’s no longer supported? -Andreas___ webkit-dev mailing list

Re: [webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?

2013-09-12 Thread Benjamin Poulain
On 9/12/13 4:48 PM, Ryosuke Niwa wrote: On Thu, Sep 12, 2013 at 4:45 PM, Allan Sandfeld Jensen mailto:k...@carewolf.com>> wrote: Don't worry we are still here, just in fewer numbers, and with fewer things to support. I would prefer to keep the warning, it is quite useful at tim

Re: [webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?

2013-09-12 Thread Ryosuke Niwa
On Thu, Sep 12, 2013 at 4:45 PM, Allan Sandfeld Jensen wrote: > Don't worry we are still here, just in fewer numbers, and with fewer > things to > support. > > I would prefer to keep the warning, it is quite useful at times, and when > it > isn't you just add a default case with an ASSERT_NOT_REAC

Re: [webkit-dev] Can we disable "control reaches end of non-void function" warning on Qt?

2013-09-12 Thread Allan Sandfeld Jensen
Don't worry we are still here, just in fewer numbers, and with fewer things to support. I would prefer to keep the warning, it is quite useful at times, and when it isn't you just add a default case with an ASSERT_NOT_REACHED(). `Allan On Friday 13 September 2013, Benjamin Poulain wrote: > Th