Guarded the static_assert macro with a C standards test.
This commit is contained in:
parent
794adcc512
commit
75dc234988
1 changed files with 4 additions and 6 deletions
|
@ -46,16 +46,14 @@ extern void __fastcall__ _afailed (const char*, unsigned);
|
|||
# define assert(expr) ((expr)? (void)0 : _afailed(__FILE__, __LINE__))
|
||||
#endif
|
||||
|
||||
/*
|
||||
** TODO: Guard with #if __STDC_VERSION__ >= 201112L or similar when there
|
||||
/* TODO: Guard with #if __CC65_STD__ >= __CC65_STD_C11__ if there
|
||||
** is a C11 mode.
|
||||
*/
|
||||
#define static_assert _Static_assert
|
||||
#if __CC65_STD__ > __CC65_STD_C99__
|
||||
# define static_assert _Static_assert
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* End of assert.h */
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue