This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: #warning _FORTIFY_SOURCE hitting in build of vprintf.c

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 Jaeger aj@{,} 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]