re PR c/3347 (Too large bitfields should be errors)
authorJoseph Myers <jsm28@gcc.gnu.org>
Wed, 17 Dec 2003 00:25:24 +0000 (00:25 +0000)
committerJoseph Myers <jsm28@gcc.gnu.org>
Wed, 17 Dec 2003 00:25:24 +0000 (00:25 +0000)
commit2ff7cce4f2a5dcc3ad18e1eed20f83a814c21be0
tree4fbf0e973113ecb7c320c16aca6d53d949bafa53
parent89843f8b85f09ac1b2e2ca617904722271a26835
re PR c/3347 (Too large bitfields should be errors)

2003-12-17  Neil Booth  <neil@daikokuya.co.uk>
            Joseph S. Myers  <jsm@polyomino.org.uk>

PR c/3347
* c-decl.c (enum_decl_context): Remove BITFIELD.
(grokdeclarator): Take bit-field width as an input.
Perform bit-field width validation with
check_bitfield_type_and_width rather than waiting for
finish_struct.
(groktypename, groktypename_in_parm_context, start_decl,
push_parm_decl, grokfield, start_function): Update calls to
grokdeclarator.
(check_bitfield_type_and_width): New function.
(finish_struct): Move bit-field validation to grokdeclarator
and check_bitfield_type_and_width.

testsuite:
* gcc.dg/bitfld-8.c: New test.

From-SVN: r74725
gcc/ChangeLog
gcc/c-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/bitfld-8.c [new file with mode: 0644]