diff options
author | bulatman <bulatman@yandex-team.com> | 2023-06-08 20:05:16 +0300 |
---|---|---|
committer | bulatman <bulatman@yandex-team.com> | 2023-06-08 20:05:16 +0300 |
commit | df6af3ee4741c667cf0c449696f768186bdc5752 (patch) | |
tree | 21ad8fed13c87e0ebec4bb5456f667a79d11c745 /util/system/compiler.h | |
parent | 8642bc755ab5b51752619694224388b2d247c737 (diff) | |
download | ydb-df6af3ee4741c667cf0c449696f768186bdc5752.tar.gz |
Require semicolon after saveload macroses
Diffstat (limited to 'util/system/compiler.h')
-rw-r--r-- | util/system/compiler.h | 4 |
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*); |