[LyX/master] Do not return copies of string members
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Thu May 11 14:32:45 UTC 2023
Le 11/05/2023 à 15:26, Jean-Marc Lasgouttes a écrit :
>> In file included from ../../../../src/frontends/qt/Toolbars.cpp:15:
>> ../../../../src/Converter.h: In member function ‘const string&
>> lyx::Converter::from() const’:
>> ../../../../src/Converter.h:55:51: warning: returning reference to
>> temporary [-Wreturn-local-addr]
>> 55 | std::string const & from() const { return from_; }
>> | ^~~~~
>
> Does this warning make any sense to you? What do I miss? I get no
> warning here.
OK, I get it now this happens when using trivstring instead of plain
std:string. I do not understand why this happens for you with gcc 11.
I thought the new ABI wa savailable with gcc 5?
Is this somthing special about cygwin or is our autoconf test broken?
Anyway the patch should remain reverted until we remove support for gcc
4.9 (which we could IMO).
JMarc
More information about the lyx-devel
mailing list