switch from c17 to gnu99

I am choosing gnu99 over c99, since I am planning to use GNU extensions,
like bswap. (in a future commit)
Why I choose c99 over c17, is because this'll produce more portable
code.

c99 does not implement noreturn.h, thus I added it to the compiler
attributes header.
This commit is contained in:
2025-06-02 12:15:49 +02:00
parent 42646baa1a
commit fc2cbd9924
3 changed files with 8 additions and 3 deletions

View File

@@ -8,6 +8,7 @@
#define atrb_unused
#define atrb_pure
#define atrb_const
#define atrb_noreturn
#define atrb_format()
#define atrb_nonnull()
@@ -34,6 +35,11 @@
#define atrb_const __attribute__((const))
#endif
#if __has_attribute(noreturn)
#undef atrb_noreturn
#define atrb_noreturn __attribute__((noreturn))
#endif
#if __has_attribute(format)
#undef atrb_format
#define atrb_format(...) __attribute__((format(__VA_ARGS__)))