brintos

brintos / llvm-project-archived public Read only

0
0
Text · 749 B · 3fd299e Raw
28 lines · c
1 2#ifndef NO_RECORD_13struct ReceivesPragma { };4#endif5 6#ifdef SET_FIRST_HEADER7#pragma pack (16)8#ifndef SET_SECOND_HEADER9// expected-note@-2 2 {{previous '#pragma pack' directive that modifies alignment is here}}10#else11// expected-note@-4 1 {{previous '#pragma pack' directive that modifies alignment is here}}12#endif13// expected-warning@+3 {{non-default #pragma pack value changes the alignment of struct or union members in the included file}}14#endif15 16#include "pragma-pack2.h"17 18#ifdef SET_SECOND_HEADER19// expected-warning@-3 {{the current #pragma pack alignment value is modified in the included file}}20#endif21 22#ifdef PUSH_POP_FIRST_HEADER23// This is fine, we don't change the current value.24#pragma pack (push, 4)25 26#pragma pack (pop)27#endif28