This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/33199] [4.3 Regression] tr1/2_general_utilities/shared_ptr/assign/auto_ptr.cc
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Aug 2007 07:31:10 -0000
- Subject: [Bug middle-end/33199] [4.3 Regression] tr1/2_general_utilities/shared_ptr/assign/auto_ptr.cc
- References: <bug-33199-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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