[PATCH] configure: Check for -Wno-pragma-pack

Martin Storsjö martin at martin.st
Tue Jan 23 00:51:55 CST 2018


On Tue, 23 Jan 2018, Thomas Faber wrote:

> On 2018-01-22 22:42, Martin Storsjö wrote:
>>>> This avoids warnings for each include of pshpack*.h/poppack.h.
>>> 
>>> Do you think a #pragma clang diagnostic inside those headers would be 
>>> feasible, to avoid hiding true positive instances of this warning?
>> 
>> I tested this now. It's easy to get rid of the warnings from the pshpack*.h 
>> files (by e.g. #pragma clang diagnostic push, #pragma clang diagnostic 
>> ignored "-Wpragma-pack").
>> 
>> Bbut if I do "#pragma clang diagnostic pop" within poppack.h, the warning 
>> is enabled again once the end of poppack.h is reached, and the warning gets 
>> triggered at the end of the source file. So each pair of 
>> pshpack*.h/poppack.h would need disabling the warning ignoring again after 
>> the #include "poppack.h".
>> 
>> Do you have any suggestions on how to handle that better, or is it just 
>> simplest to go for the blanket ignore?
>
> Thanks for trying it out. That's pretty much what I feared. Sounds like
> this warning is broken by design then, so the blanket disable seems
> right to me.

Yeah - the other alternative I can think of is splitting poppack.h into 
two; one poppack-internal.h that does the actual pragma pack pop, and the 
outer one that resets the warning again. But that's again a little too 
much effort for this warning.

// Martin


More information about the wine-devel mailing list