ICU-20325 Fix warnings about unknown pragma when building with GCC in MSYS2 (Windows).

This commit is contained in:
Jeff Genovy 2019-01-08 17:56:40 -08:00 committed by Jeff Genovy
parent 0759097731
commit c3291233c4
3 changed files with 6 additions and 0 deletions

View File

@ -18,8 +18,10 @@ U_NAMESPACE_BEGIN
// When building DLLs for Windows this is required even though no direct access leaks out of the i18n library. // When building DLLs for Windows this is required even though no direct access leaks out of the i18n library.
// See digitlst.h, pluralaffix.h, datefmt.h, and others for similar examples. // See digitlst.h, pluralaffix.h, datefmt.h, and others for similar examples.
#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN #if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN
#if defined(_MSC_VER)
// Ignore warning 4661 as LocalPointerBase does not use operator== or operator!= // Ignore warning 4661 as LocalPointerBase does not use operator== or operator!=
#pragma warning(suppress: 4661) #pragma warning(suppress: 4661)
#endif
template class U_I18N_API LocalPointerBase<int32_t>; template class U_I18N_API LocalPointerBase<int32_t>;
template class U_I18N_API LocalMemory<int32_t>; template class U_I18N_API LocalMemory<int32_t>;
#endif #endif

View File

@ -21,8 +21,10 @@ U_NAMESPACE_BEGIN
// data member of CurrencyPluralInfoWrapper. // data member of CurrencyPluralInfoWrapper.
// (When building DLLs for Windows this is required.) // (When building DLLs for Windows this is required.)
#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN #if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN
#if defined(_MSC_VER)
// Ignore warning 4661 as LocalPointerBase does not use operator== or operator!= // Ignore warning 4661 as LocalPointerBase does not use operator== or operator!=
#pragma warning(suppress: 4661) #pragma warning(suppress: 4661)
#endif
template class U_I18N_API LocalPointerBase<CurrencyPluralInfo>; template class U_I18N_API LocalPointerBase<CurrencyPluralInfo>;
template class U_I18N_API LocalPointer<CurrencyPluralInfo>; template class U_I18N_API LocalPointer<CurrencyPluralInfo>;
#endif #endif

View File

@ -21,8 +21,10 @@ U_NAMESPACE_BEGIN
// data member of AdoptingModifierStore. // data member of AdoptingModifierStore.
// (When building DLLs for Windows this is required.) // (When building DLLs for Windows this is required.)
#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN #if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN
#if defined(_MSC_VER)
// Ignore warning 4661 as LocalPointerBase does not use operator== or operator!= // Ignore warning 4661 as LocalPointerBase does not use operator== or operator!=
#pragma warning(suppress: 4661) #pragma warning(suppress: 4661)
#endif
template class U_I18N_API LocalPointerBase<number::impl::AdoptingModifierStore>; template class U_I18N_API LocalPointerBase<number::impl::AdoptingModifierStore>;
template class U_I18N_API LocalPointer<number::impl::AdoptingModifierStore>; template class U_I18N_API LocalPointer<number::impl::AdoptingModifierStore>;
#endif #endif