]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
don't use C99 static array indices with older GCC versions
authoravg <avg@FreeBSD.org>
Wed, 22 Feb 2017 17:20:18 +0000 (17:20 +0000)
committeravg <avg@FreeBSD.org>
Wed, 22 Feb 2017 17:20:18 +0000 (17:20 +0000)
commit0207bfc981807480c8d9d5482039f88af364bdc7
treecdd186dd2ec545e9ae7a6b12076dbd6991c11756
parent03a34c2eb736772fed392264503d11751ee5e17b
don't use C99 static array indices with older GCC versions

For example, the FreeBSD GCC (4.2.1) has a spotty support for that
feature.  If the static keyword is used with an unnamed array parameter
in a function declaration, then the compilation fails with:
error: static or type qualifiers in abstract declarator

The feature does work if the parameter is named.
So, the restriction introduced in this commit can be removed when all
affected function prototypes have the workaround.

MFC after: 1 week
Sponsored by: Panzura
sys/sys/cdefs.h