Next: C99 features avoided by Gnulib, Previous: C language versions, Up: Portability guidelines [Contents][Index]
Although the C99 standard specifies many features, Gnulib code is conservative about using them, partly because Gnulib predates the widespread adoption of C99, and partly because many C99 features are not well-supported in practice. C99 features that are reasonably portable nowadays include:
for
statement.
long long int
.
<stdbool.h>
, although Gnulib code no longer uses
it directly, preferring plain bool
via the
stdbool
module instead.
See stdbool.h.
<stdint.h>
, assuming the stdint
module is used.
See stdint.h.
__VA_ARGS__
in MSVC differs from the one
in ISO C 99, see https://stackoverflow.com/questions/5134523/.
But usually this matters only for macros that decompose __VA_ARGS__
.
static inline
functions.
__func__
, assuming the func
module is used. See func.
restrict
qualifier, assuming
AC_REQUIRE([AC_C_RESTRICT])
is used.
This qualifier is sometimes implemented via a macro, so C++ code that
uses Gnulib should avoid using restrict
as an identifier.
flexmember
module).