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   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to