From: Andy Heninger Date: Thu, 1 Mar 2018 21:00:46 +0000 (+0000) Subject: ICU-13541 rbbi.cpp, try again to fix xlC build problem. X-Git-Tag: release-61-rc~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0a418427337e78d2c0f0070966f0eb8107a44955;p=icu ICU-13541 rbbi.cpp, try again to fix xlC build problem. X-SVN-Rev: 41042 --- diff --git a/icu4c/source/common/rbbi.cpp b/icu4c/source/common/rbbi.cpp index 24f1f89d20f..69f92d94c60 100644 --- a/icu4c/source/common/rbbi.cpp +++ b/icu4c/source/common/rbbi.cpp @@ -277,7 +277,6 @@ RuleBasedBreakIterator::operator=(const RuleBasedBreakIterator& that) { // //----------------------------------------------------------------------------- void RuleBasedBreakIterator::init(UErrorCode &status) { - fText = UTEXT_INITIALIZER; fCharIter = NULL; fData = NULL; fPosition = 0; @@ -289,7 +288,12 @@ void RuleBasedBreakIterator::init(UErrorCode &status) { fBreakCache = NULL; fDictionaryCache = NULL; - if (U_FAILURE(status)) { + // Note: IBM xlC is unable to assign or initialize member fText from UTEXT_INITIALIZER. + // fText = UTEXT_INITIALIZER; + static const UText initializedUText = UTEXT_INITIALIZER; + uprv_memcpy(&fText, &initializedUText, sizeof(UText)); + + if (U_FAILURE(status)) { return; }