0

What C standard should I be using for portability?

I was just wondering which C standard I should be using to code. Since GCC 15 automatically sets the default to C23, I was wondering if there's any differences between C17 or C99 and which one I should be using for the most portability across Linux and BSD

17th May 2025, 11:09 PM
Youssef Dietel
Youssef Dietel - avatar
2 Answers
+ 1
According to information from websites: You should use C99. It has been supported by GCC, Clang and other BSD compilers for a long time, more than a decade. Many of the older systems which don't support C11/17 mostly support C99. Also it has features you'd commonly use in C like: single line comments, Boolean data type, long long and inline functions. So you should choose C99
18th May 2025, 2:44 AM
Afnan Irtesum Chowdhury
Afnan Irtesum Chowdhury - avatar
0
Thank you for the response
18th May 2025, 10:32 AM
Youssef Dietel
Youssef Dietel - avatar