remove gcc_unused
[[maybe_unused]] (introduced in C++17) is standard C++. https://clang.llvm.org/docs/AttributeReference.html#maybe-unused-unused says that this is equivalent to the GNU unused attribute. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
@@ -74,7 +74,6 @@
|
||||
#define gcc_printf(a,b) __attribute__((format(printf, a, b)))
|
||||
#define gcc_pure __attribute__((pure))
|
||||
#define gcc_sentinel __attribute__((sentinel))
|
||||
#define gcc_unused __attribute__((unused))
|
||||
|
||||
#define gcc_nonnull(...) __attribute__((nonnull(__VA_ARGS__)))
|
||||
#define gcc_nonnull_all __attribute__((nonnull))
|
||||
@@ -101,7 +100,6 @@
|
||||
#define gcc_printf(a,b)
|
||||
#define gcc_pure
|
||||
#define gcc_sentinel
|
||||
#define gcc_unused
|
||||
|
||||
#define gcc_nonnull(...)
|
||||
#define gcc_nonnull_all
|
||||
@@ -161,12 +159,6 @@
|
||||
#define __has_feature(x) 0
|
||||
#endif
|
||||
|
||||
#if __has_feature(attribute_unused_on_fields)
|
||||
#define gcc_unused_field gcc_unused
|
||||
#else
|
||||
#define gcc_unused_field
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#define gcc_unreachable() __builtin_unreachable()
|
||||
#else
|
||||
|
@@ -204,7 +204,7 @@ struct CheckSequenceUTF8 {
|
||||
|
||||
template<>
|
||||
struct CheckSequenceUTF8<0U> {
|
||||
constexpr bool operator()(gcc_unused const char *p) const noexcept {
|
||||
constexpr bool operator()([[maybe_unused]] const char *p) const noexcept {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user