History

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

grischka committed 5 years ago

Commit e97e1081 parent c7a57bf1 file · +6 −2Browse files

Unified · Split

tccpp.c+6−2
@@ -1725,6 +1725,7 @@ static void pragma_parse(TCCState *s1) · 1724 unmodified lines
1725 /* This may be:1725 /* This may be:
1726 #pragma pack(1) // set1726 #pragma pack(1) // set
1727 #pragma pack() // reset to default1727 #pragma pack() // reset to default
1728 #pragma pack(push) // push current
1728 #pragma pack(push,1) // push & set1729 #pragma pack(push,1) // push & set
1729 #pragma pack(pop) // restore previous */1730 #pragma pack(pop) // restore previous */
1730 next();1731 next();
@@ -1743,8 +1744,10 @@ static void pragma_parse(TCCState *s1) · 12 unmodified lines
1743 next();1744 next();
1744 if (s1->pack_stack_ptr >= s1->pack_stack + PACK_STACK_SIZE - 1)1745 if (s1->pack_stack_ptr >= s1->pack_stack + PACK_STACK_SIZE - 1)
1745 goto stk_error;1746 goto stk_error;
1746 s1->pack_stack_ptr++;1747 val = *s1->pack_stack_ptr++;
1747 skip(',');1748 if (tok != ',')
1749 goto pack_set;
1750 next();
1748 }1751 }
1749 if (tok != TOK_CINT)1752 if (tok != TOK_CINT)
1750 goto pragma_err;1753 goto pragma_err;
@@ -1753,6 +1756,7 @@ static void pragma_parse(TCCState *s1) · 2 unmodified lines
1753 goto pragma_err;1756 goto pragma_err;
1754 next();1757 next();
1755 }1758 }
1759 pack_set:
1756 *s1->pack_stack_ptr = val;1760 *s1->pack_stack_ptr = val;
1757 }1761 }
1758 if (tok != ')')1762 if (tok != ')')

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t