Gnulib avoids some features even though they are standardized by C99, as they have portability problems in practice. Here is a partial list of avoided C99 features. Many other C99 features are portable only if their corresponding modules are used; Gnulib code that uses such a feature should require the corresponding module.
__STDC_NO_VLA__
is defined.
See the vararrays
and vla
modules.
GNULIB_NO_VLA
or __STDC_NO_VLA__
is defined.
This lets you define GNULIB_NO_VLA
to pacify GCC when
using its -Wvla-larger-than warnings option,
and to avoid large stack usage that may have security implications.
GNULIB_NO_VLA
does not affect Gnulib’s other uses of VLAs and
variably modified types, such as array declarations in function
prototype scope.
intptr_t
or
uintptr_t
. Although the C standard says that values of these
integer types, if they exist, should be convertible to and from
intmax_t
and uintmax_t
without loss of information, on
CHERI platforms such conversions result in integers that, if converted
back to a pointer, cannot be dereferenced.
extern inline
functions, without checking whether they are
supported. See Extern inline functions.
<iso646.h>
, since GNU programs need not worry about deficient
source-code encodings.