https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61018
Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org Component|c++ |middle-end --- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> --- This is because the inline function is never used, so it doesn't get the lowering that produces the warning. A C testcase with a non-member inline function sees the same behavior: #include <stdarg.h> inline void foo(int x, int y, ...) { va_list ap; va_start (ap, x); } but if you add a call to foo, the warning is generated. int main() { foo(1,2,3); }