mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-30 07:23:07 +03:00
40 lines
1.2 KiB
C++
40 lines
1.2 KiB
C++
/*
|
|
* Copyright (C) 2018 Codership Oy <info@codership.com>
|
|
*
|
|
* This file is part of wsrep-lib.
|
|
*
|
|
* Wsrep-lib is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* Wsrep-lib is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with wsrep-lib. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
|
|
/** @file compiler.hpp
|
|
*
|
|
* Compiler specific options.
|
|
*/
|
|
|
|
#define WSREP_UNUSED __attribute__((unused))
|
|
#if __cplusplus >= 201103L
|
|
#define WSREP_OVERRIDE override
|
|
#else
|
|
#define WSREP_OVERRIDE
|
|
#endif // __cplusplus >= 201103L
|
|
|
|
#if defined(__clang__) && __cplusplus >= 201103L
|
|
#define WSREP_FALLTHROUGH [[clang::fallthrough]]
|
|
#elif (defined(__GNUC__) || defined(__GNUG__)) && (__GNUC__ >= 7)
|
|
#define WSREP_FALLTHROUGH __attribute__((fallthrough))
|
|
#else
|
|
#define WSREP_FALLTHROUGH
|
|
#endif
|