https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93490
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >With "INLINE" defined there is no warning. inline functions are not warned about in general. E.g. inline int &f(Class1 *a) { return a->member_; } Also does not warn.