GCC gnu89
dirkson opened this issue · comments
Heyo!
Trying to build graphene using -std=gnu89 on GCC 8.2 results in errors that "STDC_VERSION" is not defined. Which makes sense, as STDC_VERSION is not required to be defined in that version of C.
This may or may not be considered a problem, but I figured it was worth a note anyway.
It appears you check for this to determine C11 support. I'm curious what differences a graphene build has for C11 - Is that documented anywhere?
Cheers!
Trying to build graphene using -std=gnu89
There's a reason why we use c_std=c99
as a default option in the Meson configuration. I don't plan on supporting C89 with or without GCC extensions, in 2018. Graphene itself exposes C99 constructs, like C99's __STDC_VERSION__
pre-defined macro, _Bool
type, and compound literals. We only have fallbacks in place for MSVC, but I routinely drop older versions of that compiler.
The C11 support is for the _Generic
pragma, and it's only used internally to use the appropriate linear interpolation function depending on the input type, and avoid a cast or a type promotion.