diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-06-09 02:16:12 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-06-09 02:16:12 +0000 |
commit | 504687d0d2cace41536f255f04ddcee6dfa227a4 (patch) | |
tree | 409dc9e147cd73c81e6558344513d4a13f345618 /gcc/c-pragma.c | |
parent | 8ed734395e40b780c878b97f653ca5483827e9b6 (diff) | |
download | gcc-504687d0d2cace41536f255f04ddcee6dfa227a4.tar.gz |
* c-pragma.c (handle_pragma_token): Handle `#pragma pack()'
correctly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@27432 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-pragma.c')
-rw-r--r-- | gcc/c-pragma.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/c-pragma.c b/gcc/c-pragma.c index eedd0a13f0d..de9cfb899e5 100644 --- a/gcc/c-pragma.c +++ b/gcc/c-pragma.c @@ -383,8 +383,17 @@ handle_pragma_token (string, token) case ps_left: if (token == NULL_TREE) - state = (strcmp (string, ")") ? ps_bad : ps_right); - + { + /* #pragma pack () resets packing rules to their + defaults. */ + if (strcmp (string, ")") == 0) + { + align = 0; + state = ps_right; + } + else + state = ps_bad; + } else if (TREE_CODE (token) == INTEGER_CST) goto handle_align; |