New warning (or at least I only noticed it now)
José Matos
jaomatos at gmail.com
Mon Nov 21 07:34:34 UTC 2022
Hi,
I have been compiling and running 2.4 compiled with the latest
preview of gcc 13.
I got a new warning:
"note: the temporary was destroyed at the end of the full expression"
Attached follows an example, there are more I can send if they are
relevant.
Best regards,
--
José Abílio
-------------- next part --------------
/home/jamatos/lyx/lyx.anon/src/BufferView.cpp: In member function ‘bool lyx::BufferView::needsFitCursor() const’:
/home/jamatos/lyx/lyx.anon/src/BufferView.cpp:485:47: warning: possibly dangling reference to a temporary [-Wdangling-reference]
485 | frontend::FontMetrics const & fm =
| ^~
/home/jamatos/lyx/lyx.anon/src/BufferView.cpp:486:39: note: the temporary was destroyed at the end of the full expression ‘lyx::theFontMetrics((*(const lyx::FontInfo*)(&((lyx::BufferView::Private*)((const lyx::BufferView*)this)->lyx::BufferView::d)->lyx::BufferView::Private::cursor_.lyx::Cursor::getFont().lyx::Font::fontInfo())))’
486 | theFontMetrics(d->cursor_.getFont().fontInfo());
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the lyx-devel
mailing list