[systemd-devel] [systemd-commits] configure.ac

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Tue Feb 24 07:15:08 PST 2015


On Tue, Feb 24, 2015 at 04:08:17PM +0100, David Herrmann wrote:
> Hi
> 
> On Tue, Feb 24, 2015 at 4:07 PM, Zbigniew Jędrzejewski-Szmek
> <zbyszek at in.waw.pl> wrote:
> > On Tue, Feb 24, 2015 at 07:02:49AM -0800, David Herrmann wrote:
> >>  configure.ac |    1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >> New commits:
> >> commit 0a98d66159e474915afd6597d3aa444a698fdd2d
> >> Author: David Herrmann <dh.herrmann at gmail.com>
> >> Date:   Tue Feb 24 15:59:06 2015 +0100
> >>
> >>     build: add -Wno-format-signedness
> >>
> >>     gcc5 introduced this option (gcc4 silently ignores it, which is fine).
> >>     Given that gcc5 thinks 'unsigned char'/'unsigned short' is promoted to
> >>     'int' for var-args, stuff like this spits out warnings:
> >>         uint8_t x;
> >>         printf("%" PRIu8", x);
> >>
> >>     gcc5 promots 'x' to 'int', instead of 'unsigned int' and thus gets a
> >>     signedness-warnings as it expects an 'unsigned int'.
> >>
> >>     glibc states otherwise: unsigneds are always promoted to 'unsigned int'.
> >>     Until gcc and glibc figure this out, lets just ignore that warning (which
> >>     is totally useless in its current form).
> >>
> >> diff --git a/configure.ac b/configure.ac
> >> index 9a2235b..22a6f17 100644
> >> --- a/configure.ac
> >> +++ b/configure.ac
> >> @@ -186,6 +186,7 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
> >>          -Wno-unused-parameter \
> >>          -Wno-missing-field-initializers \
> >>          -Wno-unused-result \
> >> +        -Wno-format-signedness \
> > This doesn't really work, as discussed previously on the list.
> 
> Why? Works fine with gcc4 and gcc5 here. What's the problem exactly?
Positive version of the option must be used to detect reliably.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63499

Zbyszek


More information about the systemd-devel mailing list