Commit 2ff7cce4 by Joseph Myers

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
parent 89843f8b
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.
2003-12-16 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> 2003-12-16 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR bootstrap/13386 PR bootstrap/13386
......
2003-12-17 Joseph S. Myers <jsm@polyomino.org.uk>
PR c/3347
* gcc.dg/bitfld-8.c: New test.
2003-12-16 James Lemke <jim@wasabisystems.com> 2003-12-16 James Lemke <jim@wasabisystems.com>
* gcc.dg/arm-scd42-[123].c: New tests. * gcc.dg/arm-scd42-[123].c: New tests.
......
/* Test that too wide bit-fields are hard errors. PR c/3347. */
/* Origin: Joseph Myers <jsm@polyomino.org.uk>, from PR c/3347 */
/* { dg-do compile } */
/* { dg-options "" } */
struct { int i : 1999; } x; /* { dg-bogus "warning" "warning in place of error" } */
/* { dg-error "width" "bit-field too wide" { target *-*-* } 6 } */
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