svn commit: r186529 - head/sys/dev/acpi_support

Dimitry Andric dimitry at andric.com
Sun Dec 28 21:00:40 UTC 2008


On 2008-12-28 20:30, Stanislav Sedov wrote:
>>> -	ACPI_OBJECT		acpiarg[0];
>>> +	ACPI_OBJECT		acpiarg[1];
> I wonder how does gcc allowed this. It emits warnings only in
> pedantic mode which we cannot use to compile kernel with.

Zero-sized arrays are non-standard, but have been allowed by gcc (and
many other compilers) since a long time, so it is logical that it
doesn't warn about it by default.

Maybe you can try compiling it with gcc 4.3.x; I have received several
"array subscript is above array bounds" warnings using it.  However,
it's GPL3, which might open up several cans of worms...


More information about the svn-src-all mailing list