https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125203
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|false-positive, |
|needs-source |
--- Comment #3 from Drea Pinski <pinskia at gcc dot gnu.org> ---
D.30247 = core::getaddrinfo_error::strerror (this_3(D), err__5(D)); [return
slot optimization]
Making strerror static for both getaddrinfo_error and posix_error instead of a
member function makes the warning go away.
I think the warning is correct in some sense that you are calling a method
function before initializers of the constructor are finalized.
The only reason why GCC warns at -Og is because -Og does not do any inlining.
GCC does not warn at -O1, -O2 or -O3
But does at -O0 and -Og.
So this is just a diagnostic issue of not a decent warning message.