gopy icon indicating copy to clipboard operation
gopy copied to clipboard

Fix compilation with C23

Open deuill opened this issue 4 months ago • 1 comments

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.

deuill avatar Sep 04 '25 21:09 deuill

Tests will fail until #378 is merged (and this rebased).

deuill avatar Sep 20 '25 09:09 deuill