This is part 1 of adopting C17, therefore migrating to gnu17 from gnu99.
Why?
There are many reasons, but some prominent reasons are
- Facilitating the adoption of C23/C2x. This is likely to be finalized in 2024, and clang has already implemented most of C2x features. Migrating from C17 to C2x will be easier than migrating from C99 to C2x.
- C11 has adopted GCC specific features as a part of standard, such as _Alignas. However, _Alignas currently conflicts with gnu17 when used without -Wno-gnu-statement-expression
- Allowing programs to use C11 features without specifying CSTD= c17 or similar.
This revision DOES
- Change default C standard version for buildworld to gnu17
- Remove CSTD= c11 in some Makefiles since gnu17 will be automatically applied
This revision DOES NOT
- Change C standard version in contributed code in contrib/
From now own, the mimum required compiler version for is Clang 7.0.0 and GCC 8.1.0