diff --git a/source/portable/Compiler/CCS/pack_struct_end.h b/source/portable/Compiler/CCS/pack_struct_end.h index 0a48709bd..a6353c971 100644 --- a/source/portable/Compiler/CCS/pack_struct_end.h +++ b/source/portable/Compiler/CCS/pack_struct_end.h @@ -25,6 +25,8 @@ * * Contains a semicolon to end the wrapped structure, * and resets warnings that were supressed in pack_struct_start.h. + * It also pops the previously pushed alignment of 1 byte of the stack. */ ; +#pragma pack(pop) #pragma diag_pop diff --git a/source/portable/Compiler/CCS/pack_struct_start.h b/source/portable/Compiler/CCS/pack_struct_start.h index ff2a0870d..bd8eb3098 100644 --- a/source/portable/Compiler/CCS/pack_struct_start.h +++ b/source/portable/Compiler/CCS/pack_struct_start.h @@ -25,7 +25,8 @@ * * Also suppress an incorrect warning from the CCS compiler: * error #1916-D: definition at end of file not followed by a semicolon or a declarator + * Pushes the struct alignment of packed. */ #pragma diag_push #pragma diag_suppress=1916 -#pragma pack(1) +#pragma pack(push, 1)