Silence -Wzero-as-null-pointer-constant for clang
clang does not handle NULL the same way as gcc, so for now we silence the warning.
This commit is contained in:
parent
6699559320
commit
76dec417a6
@ -53,6 +53,11 @@
|
|||||||
# pragma warning(disable: 4996) // this function or variable may be unsafe
|
# pragma warning(disable: 4996) // this function or variable may be unsafe
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__clang__)
|
||||||
|
# pragma clang diagnostic push
|
||||||
|
# pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" // NULL as null pointer constant
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(__c2__)
|
#if defined(_MSC_VER) && defined(__c2__)
|
||||||
# pragma clang diagnostic push
|
# pragma clang diagnostic push
|
||||||
# pragma clang diagnostic ignored "-Wdeprecated" // this function or variable may be unsafe
|
# pragma clang diagnostic ignored "-Wdeprecated" // this function or variable may be unsafe
|
||||||
@ -13157,16 +13162,20 @@ namespace pugi
|
|||||||
# pragma option pop
|
# pragma option pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && defined(__c2__)
|
||||||
|
# pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__clang__)
|
||||||
|
# pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
// Intel C++ does not properly keep warning state for function templates,
|
// Intel C++ does not properly keep warning state for function templates,
|
||||||
// so popping warning state at the end of translation unit leads to warnings in the middle.
|
// so popping warning state at the end of translation unit leads to warnings in the middle.
|
||||||
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
|
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
|
||||||
# pragma warning(pop)
|
# pragma warning(pop)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(__c2__)
|
|
||||||
# pragma clang diagnostic pop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Undefine all local macros (makes sure we're not leaking macros in header-only mode)
|
// Undefine all local macros (makes sure we're not leaking macros in header-only mode)
|
||||||
#undef PUGI_IMPL_NO_INLINE
|
#undef PUGI_IMPL_NO_INLINE
|
||||||
#undef PUGI_IMPL_UNLIKELY
|
#undef PUGI_IMPL_UNLIKELY
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user