diff --git a/icu4c/source/common/static_unicode_sets.cpp b/icu4c/source/common/static_unicode_sets.cpp index 9e731f5781e..5d598a0e33b 100644 --- a/icu4c/source/common/static_unicode_sets.cpp +++ b/icu4c/source/common/static_unicode_sets.cpp @@ -27,6 +27,7 @@ UnicodeSet* gUnicodeSets[COUNT] = {}; // Save the empty instance in static memory to have well-defined behavior if a // regular UnicodeSet cannot be allocated. +alignas(UnicodeSet) char gEmptyUnicodeSet[sizeof(UnicodeSet)]; // Whether the gEmptyUnicodeSet is initialized and ready to use. diff --git a/icu4c/source/i18n/number_decimfmtprops.cpp b/icu4c/source/i18n/number_decimfmtprops.cpp index 6754fe19eca..12fe7060e2d 100644 --- a/icu4c/source/i18n/number_decimfmtprops.cpp +++ b/icu4c/source/i18n/number_decimfmtprops.cpp @@ -15,6 +15,7 @@ using namespace icu::number::impl; namespace { +alignas(DecimalFormatProperties) char kRawDefaultProperties[sizeof(DecimalFormatProperties)]; icu::UInitOnce gDefaultPropertiesInitOnce = U_INITONCE_INITIALIZER;