bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: test-intprops.c: many new warnings


From: Eric Blake
Subject: Re: test-intprops.c: many new warnings
Date: Tue, 24 May 2011 18:06:55 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.10

On 05/24/2011 05:50 PM, Paul Eggert wrote:
> +++ b/tests/test-intprops.c
> @@ -16,6 +16,12 @@
>  
>  /* Written by Paul Eggert.  */
>  
> +/* Tell gcc not to warn about the many (X < 0) expressions that
> +   the overflow macros expand to.  */
> +#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
> +# pragma GCC diagnostic ignored "-Wtype-limits"
> +#endif

Would it be possible instead to write forwarding macros?  That is, the
outer macro calls concat(name,test(params)) where test expands to either
0 or 1, at which point name##result can be used to call name0 for the
unsigned case (no X < 0) or name1 for the signed case (including X < 0)
checks?

Otherwise, we are just disabling the warnings for this test, but the
warnings will still byte us in regular code.  I guess I'll try to find
time to play with the idea instead.

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]