This patch adds a new -Wpragma-pack warning. It warns in the following cases:
- When a translation unit is missing terminating #pragma pack (pop) directives.
- When entering an included file if the current alignment value as determined by '#pragma pack' directives is different from the default alignment value.
- When leaving an included file that changed the state of the current alignment value.
The change in the parser is required to avoid a missing diagnostic in the following scenario:
#pragma pack (push, 1) #include “foo.h” // Without the change, the diagnostic for the 2nd case won’t be emitted since include will get processed by the Sema before the pragma