gc
gc copied to clipboard
Migrate to modern C (C11 or C17)
C99 is nice but it's so damn old.
Migrating to C11 would allow to use platform agnostic atomics and maybe threads (must verify compatibility with #20). See https://en.cppreference.com/w/c/thread for details. C17 doesn't bring anything but fixed defects.
The library was also developed with clang 8 and GCC 7.5 which are so 2018. It would be nice to use more recent C compilers such as clang 14, GCC 13. They likely spout more useful warnings.
I installed clang-13 and gcc-11 and they didn't spout any additional warning. I also tested -c11 and -c17 instead of -c99 and it made no difference. It compiles properly and the test suite is passing.