mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-34770 GCC warning fix
kvm-bintar-trusty-x86: warning: ‘no_sanitize’ attribute directive ignored [-Wattributes] The attribute is supported since gcc 8.
This commit is contained in:
@@ -71,10 +71,14 @@
|
||||
#endif
|
||||
|
||||
/* gcc 7.5.0 does not support __attribute__((no_sanitize("undefined")) */
|
||||
#if defined(__clang__)
|
||||
#define __attribute_no_sanitize__ __attribute__((no_sanitize("undefined")))
|
||||
#else
|
||||
#define __attribute_no_sanitize__
|
||||
#ifndef ATTRIBUTE_NO_UBSAN
|
||||
# if (GCC_VERSION >= 8000) || defined(__clang__)
|
||||
# define ATTRIBUTE_NO_UBSAN __attribute__((no_sanitize("undefined")))
|
||||
# elif (GCC_VERSION >= 6001)
|
||||
# define ATTRIBUTE_NO_UBSAN __attribute__((no_sanitize_undefined))
|
||||
# else
|
||||
# define ATTRIBUTE_NO_UBSAN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* _my_attribute_h */
|
||||
|
Reference in New Issue
Block a user