diff --git a/icu4c/source/common/udatamem.c b/icu4c/source/common/udatamem.c index d08d7e8f84..db23eb101e 100644 --- a/icu4c/source/common/udatamem.c +++ b/icu4c/source/common/udatamem.c @@ -61,8 +61,9 @@ UDataMemory_normalizeDataPointer(const void *p) { } else { #ifdef OS400 /* - WARNING! WARNING! WARNING! - This is a hack. This is here because this platform can't properly put + TODO: Fix this once the compiler implements this feature. Keep in sync with genccode.c + + This is here because this platform can't currently put const data into the read-only pages of an object or shared library (service program). Only strings are allowed in read-only pages, so we use char * strings to store the data. @@ -71,7 +72,7 @@ UDataMemory_normalizeDataPointer(const void *p) { magic numbers we must skip the initial double. [grhoten 4/24/2003] */ - return (const DataHeader *)*((const char **)((const double *)p+1)); + return (const DataHeader *)*((const void **)p+1); #else return (const DataHeader *)((const double *)p+1); #endif diff --git a/icu4c/source/tools/genccode/genccode.c b/icu4c/source/tools/genccode/genccode.c index 06a265dc7e..3e272d0b39 100644 --- a/icu4c/source/tools/genccode/genccode.c +++ b/icu4c/source/tools/genccode/genccode.c @@ -182,8 +182,9 @@ writeCCode(const char *filename, const char *destdir) { #ifdef OS400 /* - WARNING! WARNING! WARNING! - This is a hack. This is here because this platform can't properly put + TODO: Fix this once the compiler implements this feature. Keep in sync with udatamem.c + + This is here because this platform can't currently put const data into the read-only pages of an object or shared library (service program). Only strings are allowed in read-only pages, so we use char * strings to store the data.