diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-15 22:10:16 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-15 22:10:16 +0000 |
commit | 8b54bce65e960d78f0ff1d62af3710798b72ed6f (patch) | |
tree | 7a989365c25e771cb6f76f1099eaf88f7b22a0be /gcc/c-decl.c | |
parent | fcc21886d1ae2dc450f5be1b1b31aa0c09fec25f (diff) | |
download | gcc-8b54bce65e960d78f0ff1d62af3710798b72ed6f.tar.gz |
PR c/18498
* c-decl.c (grokdeclarator): Call check_bitfield_type_and_width
after processing the declarator.
testsuite:
* gcc.dg/bitfld-13.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90696 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index f5bc6e5db6a..709abed0365 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -3809,10 +3809,6 @@ grokdeclarator (const struct c_declarator *declarator, && TREE_CODE (type) == INTEGER_TYPE) type = c_common_unsigned_type (type); - /* Check the type and width of a bit-field. */ - if (bitfield) - check_bitfield_type_and_width (&type, width, orig_name); - /* Figure out the type qualifiers for the declaration. There are two ways a declaration can become qualified. One is something like `const int i' where the `const' is explicit. Another is @@ -4252,6 +4248,10 @@ grokdeclarator (const struct c_declarator *declarator, /* Now TYPE has the actual type. */ + /* Check the type and width of a bit-field. */ + if (bitfield) + check_bitfield_type_and_width (&type, width, orig_name); + /* Did array size calculations overflow? */ if (TREE_CODE (type) == ARRAY_TYPE |