mirror of
https://github.com/opencv/opencv.git
synced 2026-07-21 19:33:03 +04:00
Merge pull request #29083 from vrabaud:ubsan
Get CV_DISABLE_UBSAN to compile with older compilers
This commit is contained in:
@@ -695,9 +695,15 @@ __CV_ENUM_FLAGS_BITWISE_XOR_EQ (EnumType, EnumType)
|
||||
#endif
|
||||
|
||||
#if defined(__clang__) || defined(__GNUC__)
|
||||
#define CV_DISABLE_UBSAN __attribute__((no_sanitize("undefined")))
|
||||
#else
|
||||
#define CV_DISABLE_UBSAN
|
||||
# if defined(__has_attribute)
|
||||
# if __has_attribute(no_sanitize)
|
||||
# define CV_DISABLE_UBSAN __attribute__((no_sanitize("undefined")))
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef CV_DISABLE_UBSAN
|
||||
# define CV_DISABLE_UBSAN
|
||||
#endif
|
||||
|
||||
/****************************************************************************************\
|
||||
|
||||
Reference in New Issue
Block a user