------- Comment #4 from rguenth at gcc dot gnu dot org 2007-08-27 07:31 ------- The inliner can perfectly cope with varargs if they are unused. See gcc.dg/inline-23.c:
/* { dg-do compile } */ /* { dg-options "-std=gnu89" } */ /* Make sure we can inline a varargs function whose variable arguments are not used. See PR32493. */ #include <stddef.h> static inline __attribute__((always_inline)) void __check_printsym_format(const char *fmt, ...) { } static inline __attribute__((always_inline)) void print_symbol(const char *fmt, ptrdiff_t addr) { __check_printsym_format(fmt, ""); } void do_initcalls(void **call) { print_symbol(": %s()", (ptrdiff_t) *call); } That is, for C we didn't exclude varargs functions from inlining. (Not that I think this is particular wise, but we'd regress in the testcase above) I'll have a look. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33199