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:
parent
d066fbbcf5
commit
1452d8164d
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user