1
0
mirror of https://github.com/cc65/cc65.git synced 2025-04-07 11:38:02 +00:00

add ATTR_UNUSED and ATTR_NORETURN

This commit is contained in:
mrdudz 2022-11-05 20:37:41 +01:00
parent d066fbbcf5
commit 1452d8164d

View File

@ -44,14 +44,20 @@
#if defined(__GNUC__)
# define attribute(a) __attribute__(a)
#ifdef __clang__
# define attribute(a) __attribute__(a)
# define ATTR_UNUSED(x)
# define ATTR_NORETURN __attribute__((analyzer_noreturn))
#elif defined(__GNUC__)
# define attribute(a) __attribute__(a)
# define ATTR_UNUSED(x) __attribute__((__unused__)) x
# define ATTR_NORETURN __attribute__((noreturn))
#else
# define attribute(a)
# define ATTR_UNUSED(x)
# define ATTR_NORETURN
#endif
/* End of attrib.h */
#endif