aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/compiler.h
diff options
context:
space:
mode:
authorbulatman <bulatman@yandex-team.com>2023-06-08 20:05:16 +0300
committerbulatman <bulatman@yandex-team.com>2023-06-08 20:05:16 +0300
commitdf6af3ee4741c667cf0c449696f768186bdc5752 (patch)
tree21ad8fed13c87e0ebec4bb5456f667a79d11c745 /util/system/compiler.h
parent8642bc755ab5b51752619694224388b2d247c737 (diff)
downloadydb-df6af3ee4741c667cf0c449696f768186bdc5752.tar.gz
Require semicolon after saveload macroses
Diffstat (limited to 'util/system/compiler.h')
-rw-r--r--util/system/compiler.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/util/system/compiler.h b/util/system/compiler.h
index 32acd434884..953837f9192 100644
--- a/util/system/compiler.h
+++ b/util/system/compiler.h
@@ -613,6 +613,10 @@ _YandexAbort();
#define Y_REINITIALIZES_OBJECT
#endif
+// Use at the end of macros declaration. It allows macros usage only with semicolon at the end.
+// It prevents from warnings for extra semicolons when building with flag `-Wextra-semi`.
+#define Y_SEMICOLON_GUARD static_assert(true, "")
+
#ifdef __cplusplus
void UseCharPointerImpl(volatile const char*);