Commit e97e108d authored by grischka's avatar grischka
Browse files

tccpe: #pragma pack(push) - support this form

parent c7a57bf1
......@@ -1725,6 +1725,7 @@ static void pragma_parse(TCCState *s1)
/* This may be:
#pragma pack(1) // set
#pragma pack() // reset to default
#pragma pack(push) // push current
#pragma pack(push,1) // push & set
#pragma pack(pop) // restore previous */
next();
......@@ -1743,8 +1744,10 @@ static void pragma_parse(TCCState *s1)
next();
if (s1->pack_stack_ptr >= s1->pack_stack + PACK_STACK_SIZE - 1)
goto stk_error;
s1->pack_stack_ptr++;
skip(',');
val = *s1->pack_stack_ptr++;
if (tok != ',')
goto pack_set;
next();
}
if (tok != TOK_CINT)
goto pragma_err;
......@@ -1753,6 +1756,7 @@ static void pragma_parse(TCCState *s1)
goto pragma_err;
next();
}
pack_set:
*s1->pack_stack_ptr = val;
}
if (tok != ')')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment