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 authored and alejandro-colomar committed Jan 8, 2025
1 parent cc2ef99 commit 15524dd
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 15524dd

Please sign in to comment.