Change the build system to use C23 or C2x (the experimental version of C23 used before the official release). We plan to convert functions to return pal_error_t instead of int. This will be implemented in separate commits, each making small, incremental changes.
This commit is done also to enforce a new policy on a new code.
Why __has_c_attribute
The __has_c_attribute is used to check the availability of new attributes. It was added simultaneously with nodiscard in the experimental version: https://gcc.gnu.org/gcc-11/changes.html.
Description of the changes
Change the build system to use C23 or C2x (the experimental version of C23 used before the official release). We plan to convert functions to return pal_error_t instead of int. This will be implemented in separate commits, each making small, incremental changes.
This commit is done also to enforce a new policy on a new code.
Why __has_c_attribute
The
__has_c_attribute
is used to check the availability of new attributes. It was added simultaneously withnodiscard
in the experimental version: https://gcc.gnu.org/gcc-11/changes.html.Documentation for __has_c_attribute can be found at: https://en.cppreference.com/w/c/language/attributes.
How to test this PR?
CI.
This change is