Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernel: fix GAP_STATIC_ASSERT fallback code #2691

Merged
merged 1 commit into from
Aug 11, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@
#else
// If the compiler does not support _Static_assert resp. static_assert,
// fall back to a hack (the error message is a bit ugly in that case).
#define _intern_CONCAT_(X, Y) X ## Y
#define _intern_CONCAT(X, Y) _intern_CONCAT_(X,Y)
#define GAP_STATIC_ASSERT(cond, msg) \
typedef char static_assertion_##__LINE__[(cond)? 1 : -1]
typedef char _intern_CONCAT(static_assertion_, __LINE__)[(cond)? 1 : -1]
#endif


Expand Down