Re: [webkit-dev] -Wpessimizing-move and -Wredundant-move

2019-03-19 Thread Michael Catanzaro
Several more return WTFMove() cases were committed just between yesterday and today. Please be careful. :) On Tue, Mar 19, 2019 at 8:01 AM, Emilio Cobos =?iso-8859-1?q?=C1lvarez?= wrote: In Gecko, when I switched from mozilla::Move to std::move [1], I had to disable the warning and fix all

Re: [webkit-dev] -Wpessimizing-move and -Wredundant-move

2019-03-19 Thread Emilio Cobos Álvarez
On 19/03/2019 00:56, Michael Catanzaro wrote: > On Mon, Mar 18, 2019 at 4:43 PM, Andy Estes wrote: >> FWIW, Apple’s ports use the equivalent clang warning for pessimizing >> and redundant moves, and we cleaned up a bunch of these mistakes in >> our ports a few years ago. Hopefully you aren’t

Re: [webkit-dev] -Wpessimizing-move and -Wredundant-move

2019-03-19 Thread Tomas Popela
Ah, good to know! Thank you Michael :) Tom On Tue, Mar 19, 2019 at 1:42 PM Michael Catanzaro wrote: > On Tue, Mar 19, 2019 at 12:57 AM, Tomas Popela > wrote: > > If a note from > > > https://cgit.freedesktop.org/libreoffice/core/commit/?id=dc06c8f4989fc28d0c31ebd333e53dfe0e0f5f66 > > applies,

Re: [webkit-dev] -Wpessimizing-move and -Wredundant-move

2019-03-19 Thread Michael Catanzaro
On Tue, Mar 19, 2019 at 12:57 AM, Tomas Popela wrote: If a note from https://cgit.freedesktop.org/libreoffice/core/commit/?id=dc06c8f4989fc28d0c31ebd333e53dfe0e0f5f66 applies, then you can't fix it until we support Ubuntu 14.04 (due to its old gcc version): Turns out the std::move can only

Re: [webkit-dev] -Wpessimizing-move and -Wredundant-move

2019-03-18 Thread Tomas Popela
Hi, On Mon, Mar 18, 2019 at 10:40 PM Michael Catanzaro wrote: > -Wredundant-move ("warning: redundant move in return statement") warnings. > If a note from https://cgit.freedesktop.org/libreoffice/core/commit/?id=dc06c8f4989fc28d0c31ebd333e53dfe0e0f5f66 applies, then you can't fix it until we

Re: [webkit-dev] -Wpessimizing-move and -Wredundant-move

2019-03-18 Thread Michael Catanzaro
On Mon, Mar 18, 2019 at 4:43 PM, Andy Estes wrote: FWIW, Apple’s ports use the equivalent clang warning for pessimizing and redundant moves, and we cleaned up a bunch of these mistakes in our ports a few years ago. Hopefully you aren’t finding any of these mistakes in shared code. There are

Re: [webkit-dev] -Wpessimizing-move and -Wredundant-move

2019-03-18 Thread Andy Estes
Hi Michael, > On Mar 18, 2019, at 2:35 PM, Michael Catanzaro wrote: > > Hi, > > GCC 9 has new -Wpessimizing-move ("warning: moving a local object in a return > statement prevents copy elision") and -Wredundant-move ("warning: redundant > move in return statement") warnings. These are enabled

Re: [webkit-dev] -Wpessimizing-move and -Wredundant-move

2019-03-18 Thread Xan
I recently had to test GCC 9 and fixed one of the worst offenders in terms of number of warnings when compiling JSC. See: https://bugs.webkit.org/show_bug.cgi?id=195798 On Mon, Mar 18, 2019, 22:36 Michael Catanzaro wrote: > Hi, > > GCC 9 has new -Wpessimizing-move ("warning: moving a local