This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: #warning _FORTIFY_SOURCE hitting in build of vprintf.c
- From: Andreas Jaeger <aj at suse dot com>
- To: libc-alpha at sourceware dot org
- Cc: Roland McGrath <roland at hack dot frob dot com>
- Date: Thu, 10 May 2012 09:05:49 +0200
- Subject: Re: #warning _FORTIFY_SOURCE hitting in build of vprintf.c
- References: <20120509224422.6D7A52C0A7@topped-with-meat.com>
On Thursday, May 10, 2012 00:44:22 Roland McGrath wrote:
> [AJ, please ignore the first copy I sent you when I forgot to CC the
> list.]
>
> After your change, I'm getting:
>
> In file included from ../libio/stdio.h:27,
> from ../include/stdio.h:5,
> from vprintf.c:20:
> ../include/features.h:330:4: warning: #warning _FORTIFY_SOURCE requires
> compiling with optimization (-O)
>
> vprintf.c is obviously compiled with -O2 like everything else.
I'm not getting this at all on Linux/x86-64 - nowhere.
What is your compile line and on which platform are you seeing this?
Something strange is going on:
Line 20 of vfprintf.c contains #include <printf.h>, the stdio.h include is
in line 30.
> Can you investigate? Off hand it looks like vprintf.c can just include
> something or other to get <features.h> before its #undef. Or probably
> better, we could just use something different to control the
> bits/stdio.h inline definition. Off hand it looks like #define
> __NO_INLINE__ at the top of vprintf.c would do it.
>
> As a general admonition, everybody should be looking out for new
> warnings appearing in the compilation when they make a change.
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126