This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c/3347: Too large bitfields should be errors



>Number:         3347
>Category:       c
>Synopsis:       Too large bitfields should be errors
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          accepts-illegal
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 21 13:06:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Hallvard B Furuseth
>Release:        3.0 20010611 (prerelease)
>Organization:
University of Oslo, Norway
>Environment:
System: SunOS bombur.uio.no 5.8 Generic_108528-03 sun4u sparc SUNW,Ultra-5_10
Architecture: sun4

	
host: sparc-sun-solaris2.8
build: sparc-sun-solaris2.8
target: sparc-sun-solaris2.8
configured with: ./configure --quiet
>Description:
	A too large bitfield is a constraint violation of C99 6.7.2.1p3.
	I think it violates ANSI and K&R too, but I can't check that.
	Gcc only gives a plain warning, even under -std=c99 -pedantic.
>How-To-Repeat:
	bash$ echo 'struct { int i : 9999; } x;' > a.c
	bash$ ./xgcc -B./ -std=c99 -pedantic -o /dev/null -S a.c

	a.c:1: warning: width of `i' exceeds its type
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]