#endif
+#if __has_c_attribute(maybe_unused)
+# define MAYBE_UNUSED [[maybe_unused]]
+#else
+# define MAYBE_UNUSED
+#endif
+
#if (__GNUC__ >= 10)
-# define MAYBE_UNUSED [[gnu::unused]]
# define NORETURN [[gnu::__noreturn__]]
# define format_attr(type, fmt, va) [[gnu::format(type, fmt, va)]]
# define ATTR_ACCESS(...) [[gnu::access(__VA_ARGS__)]]
# define ATTR_ALLOC_SIZE(...) [[gnu::alloc_size(__VA_ARGS__)]]
#else
-# define MAYBE_UNUSED
# define NORETURN
# define format_attr(type, fmt, va)
# define ATTR_ACCESS(...)