Skip to content

Commit

Permalink
lib/attr.h: use C23 attributes only with gcc >= 10
Browse files Browse the repository at this point in the history
These are not available on earlier versions and builds break there.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
  • Loading branch information
Alexander Kanavin committed Jan 8, 2025
1 parent cc2ef99 commit b6c4ecc
Show file tree
Hide file tree
Showing 2 changed files with 445 additions and 313 deletions.
2 changes: 1 addition & 1 deletion lib/attr.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "config.h"


#if defined(__GNUC__)
#if (__GNUC__ >= 10)
# define MAYBE_UNUSED [[gnu::unused]]
# define NORETURN [[gnu::__noreturn__]]
# define format_attr(type, fmt, va) [[gnu::format(type, fmt, va)]]
Expand Down
Loading

0 comments on commit b6c4ecc

Please sign in to comment.