gc icon indicating copy to clipboard operation
gc copied to clipboard

Migrate to modern C (C11 or C17)

Open ysbaddaden opened this issue 3 years ago • 1 comments

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.

ysbaddaden avatar Jun 23 '22 10:06 ysbaddaden

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.

ysbaddaden avatar Jun 23 '22 19:06 ysbaddaden