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.