[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: intprops and warnings
From: |
Eric Blake |
Subject: |
Re: intprops and warnings |
Date: |
Wed, 06 Feb 2013 11:23:09 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
On 02/06/2013 11:01 AM, Paul Eggert wrote:
> On 02/06/13 07:31, Eric Blake wrote:
>> Since then, we have started using gcc pragmas to push and pop warnings,
>> maybe we could exploit that to at least allow you to still use the
>> warning category elsewhere
>
> By "elsewhere" I assume you mean "code that doesn't include intprops.h"?
> Or do you mean "code that is outside of calls to intprops.h macros"?
> The former we could do, but it wouldn't involve pushing and popping,
> it'd involve disabling the warning. The latter I don't think is
> doable, even with push and pop, because in practice the pragma's actions
> are not that fine-grained.
Can't you use _Pragma to #define an expression that expands to a pragma
push, expression body, and pragma pop, all in one macro expansion? If
so, then we have the fine-grained usage we need. If not, then yes,
disabling the warning for the remainder of all .c files that include
"intprops.h" is probably the best we can do.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature