gopy
gopy copied to clipboard
Fix compilation with C23
GCC 15 has been released (fairly) recently, and with it come C23 features such as built-in bool types, which obviate the need for defining these in each code-base.
In our case, this also causes compilation errors with GCC 15 (unless the -std=gnu17 flag is passed), e.g.:
./test.go:16:17: error: two or more data types in declaration specifiers
16 | typedef uint8_t bool;
| ^~~~
This commit wraps these typedef declarations in __STDC_VERSION__ checks, skipping if the version is C23 or over.
Tests will fail until #378 is merged (and this rebased).