Warning on move and dereference of unique_ptr in the same expression

2020-02-03 Thread Allan Sandfeld Jensen
Hello gcc I have now twice hit obscure bugs in Chromium that crashed on some compilers but not on others, and didn't produce any warnings on any compiler. I would like to know if this code is as undefined as I think it is, and if it would make sense to have gcc warn about it. Both cases basica

Re: Warning on move and dereference of unique_ptr in the same expression

2020-02-03 Thread Marek Polacek
On Mon, Feb 03, 2020 at 09:26:40PM +0100, Allan Sandfeld Jensen wrote: > Hello gcc > > I have now twice hit obscure bugs in Chromium that crashed on some compilers > but not on others, and didn't produce any warnings on any compiler. I would > like to know if this code is as undefined as I think

Re: Warning on move and dereference of unique_ptr in the same expression

2020-02-03 Thread Allan Sandfeld Jensen
On Montag, 3. Februar 2020 21:47:13 CET Marek Polacek wrote: > On Mon, Feb 03, 2020 at 09:26:40PM +0100, Allan Sandfeld Jensen wrote: > > Hello gcc > > > > I have now twice hit obscure bugs in Chromium that crashed on some > > compilers but not on others, and didn't produce any warnings on any > >