Work around gcc-8 warning
gcc-8 produces "attribute directive ignored" warning for
no_sanitize("unsigned-integer-overflow"); at some point gcc will
introduce integer sanitizer support and we'll have to do this all over
again but for now just don't emit the attribute.
This commit is contained in:
parent
cb0e8937da
commit
4f9af79850
@ -106,8 +106,8 @@
|
|||||||
# define PUGI__DMC_VOLATILE
|
# define PUGI__DMC_VOLATILE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Integer sanitizer workaround
|
// Integer sanitizer workaround; we only apply this for clang since gcc8 has no_sanitize but not unsigned-integer-overflow and produces "attribute directive ignored" warnings
|
||||||
#ifdef __has_attribute
|
#if defined(__clang__) && defined(__has_attribute)
|
||||||
# if __has_attribute(no_sanitize)
|
# if __has_attribute(no_sanitize)
|
||||||
# define PUGI__UNSIGNED_OVERFLOW __attribute__((no_sanitize("unsigned-integer-overflow")))
|
# define PUGI__UNSIGNED_OVERFLOW __attribute__((no_sanitize("unsigned-integer-overflow")))
|
||||||
# else
|
# else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user