https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66918

pskocik at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pskocik at gmail dot com

--- Comment #7 from pskocik at gmail dot com ---
I'd also very much welcome a way to silence this (like with
-Wno-undefined-inline on clang).

My reason for wanting it is I'd like to prototype a non-static inline function
in one header (a fast-to-include header), define it in another (a
slower-to-parse header that might not always be needed), and have both headers
includable in the same translation unit.

Dummy example:

/*first.h*/
inline void f(void);

/*second.h*/
//#include "first.h"
inline void f(void){}

Unfortunately, if only the first header is included, gcc's generating this
unsilencable warning unless I drop the `inline` from the prototype, but if I do
and if I then also include the second header with the definition, then the
prototype without the inline will turn into an unwanted instantiation and
linker errors down the road.

Reply via email to