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

David Herrmann dh.herrmann at gmail.com
Tue Feb 24 08:54:46 PST 2015


Hey

On Tue, Feb 24, 2015 at 4:20 PM, David Herrmann <dh.herrmann at gmail.com> wrote:
> Hi
>
> On Tue, Feb 24, 2015 at 4:15 PM, Zbigniew Jędrzejewski-Szmek
> <zbyszek at in.waw.pl> wrote:
>> 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
>
> Do we care? I mean I prefer a warning about unknown command-line
> options over thousands of warnings regarding totally useless (and imo
> wrong) signedness-mismatches. Furthermore, the warning is only printed
> if there's another warning.
>
> I can have a look at adding a CC_CHECK_NO_WARNING_APPEND() or
> something like that, which properly tests for the non-negated version.

I now fixed CC_CHECK_FLAG_APPEND. If someone knows m4+bash hacking
well, please review that:
http://cgit.freedesktop.org/systemd/systemd/commit/?id=43bbf1acc8202de895e5449828a7b863c69fcc2f

Thanks
David


More information about the systemd-devel mailing list