diff --git a/icu4c/source/common/unicode/ubrk.h b/icu4c/source/common/unicode/ubrk.h
index afb9c4ce9d0..f4e734aa5c4 100644
--- a/icu4c/source/common/unicode/ubrk.h
+++ b/icu4c/source/common/unicode/ubrk.h
@@ -185,7 +185,7 @@
*/
/** The possible types of text boundaries. @stable ICU 2.0 */
-typedef enum {
+typedef enum UBreakIteratorType {
/** Character breaks @stable ICU 2.0 */
UBRK_CHARACTER,
/** Word breaks @stable ICU 2.0 */
@@ -223,7 +223,7 @@ typedef enum {
* than for single individual values.
* @stable ICU 2.2
*/
-typedef enum {
+typedef enum UWordBreak {
/** Tag value for "words" that do not fit into any of other categories.
* Includes spaces and most punctuation. */
UBRK_WORD_NONE = 0,
@@ -256,7 +256,7 @@ typedef enum {
* than for single individual values.
* @stable ICU 2.8
*/
-typedef enum {
+typedef enum ULineBreakTag {
/** Tag value for soft line breaks, positions at which a line break
* is acceptable but not required */
UBRK_LINE_SOFT = 0,
@@ -278,7 +278,7 @@ typedef enum {
* than for single individual values.
* @stable ICU 2.8
*/
-typedef enum {
+typedef enum USentenceBreakTag {
/** Tag value for for sentences ending with a sentence terminator
* ('.', '?', '!', etc.) character, possibly followed by a
* hard separator (CR, LF, PS, etc.)
diff --git a/icu4c/source/common/unicode/uchar.h b/icu4c/source/common/unicode/uchar.h
index 86b46c7c89b..0adb47f83c5 100644
--- a/icu4c/source/common/unicode/uchar.h
+++ b/icu4c/source/common/unicode/uchar.h
@@ -171,7 +171,7 @@ U_CDECL_BEGIN
* @see u_getUnicodeVersion
* @stable ICU 2.1
*/
-typedef enum {
+typedef enum UProperty {
/* See note !!. Comments of the form "Binary property Dash",
"Enumerated property Script", "Double property Numeric_Value",
and "String property Age" are read by genpname. */
@@ -575,7 +575,8 @@ typedef enum {
* See http://www.unicode.org/Public/UNIDATA/UnicodeData.html .
* @stable ICU 2.0
*/
-typedef enum {
+typedef enum UCharCategory
+{
/** See note !!. Comments of the form "Cn" are read by genpname. */
/** Non-category for unassigned and non-character code points. @stable ICU 2.0 */
@@ -760,7 +761,7 @@ typedef enum {
* This specifies the language directional property of a character set.
* @stable ICU 2.0
*/
-typedef enum {
+typedef enum UCharDirection {
/** See note !!. Comments of the form "EN" are read by genpname. */
/** L @stable ICU 2.0 */
@@ -1249,7 +1250,7 @@ typedef enum UBlockCode UBlockCode;
* @see u_getIntPropertyValue
* @stable ICU 2.2
*/
-typedef enum {
+typedef enum UEastAsianWidth {
U_EA_NEUTRAL, /*[N]*/ /*See note !!*/
U_EA_AMBIGUOUS, /*[A]*/
U_EA_HALFWIDTH, /*[H]*/
@@ -1274,7 +1275,7 @@ typedef enum {
* @see u_charName
* @stable ICU 2.0
*/
-typedef enum {
+typedef enum UCharNameChoice {
U_UNICODE_CHAR_NAME,
U_UNICODE_10_CHAR_NAME,
U_EXTENDED_CHAR_NAME,
@@ -1294,7 +1295,7 @@ typedef enum {
* @see u_getPropertyValueName()
* @stable ICU 2.4
*/
-typedef enum {
+typedef enum UPropertyNameChoice {
U_SHORT_PROPERTY_NAME,
U_LONG_PROPERTY_NAME,
U_PROPERTY_NAME_CHOICE_COUNT
@@ -1306,7 +1307,7 @@ typedef enum {
* @see UCHAR_DECOMPOSITION_TYPE
* @stable ICU 2.2
*/
-typedef enum {
+typedef enum UDecompositionType {
U_DT_NONE, /*[none]*/ /*See note !!*/
U_DT_CANONICAL, /*[can]*/
U_DT_COMPAT, /*[com]*/
@@ -1334,7 +1335,7 @@ typedef enum {
* @see UCHAR_JOINING_TYPE
* @stable ICU 2.2
*/
-typedef enum {
+typedef enum UJoiningType {
U_JT_NON_JOINING, /*[U]*/ /*See note !!*/
U_JT_JOIN_CAUSING, /*[C]*/
U_JT_DUAL_JOINING, /*[D]*/
@@ -1350,7 +1351,7 @@ typedef enum {
* @see UCHAR_JOINING_GROUP
* @stable ICU 2.2
*/
-typedef enum {
+typedef enum UJoiningGroup {
U_JG_NO_JOINING_GROUP,
U_JG_AIN,
U_JG_ALAPH,
@@ -1414,7 +1415,7 @@ typedef enum {
* @see UCHAR_GRAPHEME_CLUSTER_BREAK
* @draft ICU 3.4
*/
-typedef enum {
+typedef enum UGraphemeClusterBreak {
U_GCB_OTHER, /*[XX]*/ /*See note !!*/
U_GCB_CONTROL, /*[CN]*/
U_GCB_CR, /*[CR]*/
@@ -1435,7 +1436,7 @@ typedef enum {
* @see UCHAR_WORD_BREAK
* @draft ICU 3.4
*/
-typedef enum {
+typedef enum UWordBreakValues {
U_WB_OTHER, /*[XX]*/ /*See note !!*/
U_WB_ALETTER, /*[LE]*/
U_WB_FORMAT, /*[FO]*/
@@ -1453,7 +1454,7 @@ typedef enum {
* @see UCHAR_SENTENCE_BREAK
* @draft ICU 3.4
*/
-typedef enum {
+typedef enum USentenceBreak {
U_SB_OTHER, /*[XX]*/ /*See note !!*/
U_SB_ATERM, /*[AT]*/
U_SB_CLOSE, /*[CL]*/
@@ -1474,7 +1475,7 @@ typedef enum {
* @see UCHAR_LINE_BREAK
* @stable ICU 2.2
*/
-typedef enum {
+typedef enum ULineBreak {
U_LB_UNKNOWN, /*[XX]*/ /*See note !!*/
U_LB_AMBIGUOUS, /*[AI]*/
U_LB_ALPHABETIC, /*[AL]*/
@@ -1522,7 +1523,7 @@ typedef enum {
* @see UCHAR_NUMERIC_TYPE
* @stable ICU 2.2
*/
-typedef enum {
+typedef enum UNumericType {
U_NT_NONE, /*[None]*/ /*See note !!*/
U_NT_DECIMAL, /*[de]*/
U_NT_DIGIT, /*[di]*/
@@ -1536,7 +1537,7 @@ typedef enum {
* @see UCHAR_HANGUL_SYLLABLE_TYPE
* @stable ICU 2.6
*/
-typedef enum {
+typedef enum UHangulSyllableType {
U_HST_NOT_APPLICABLE, /*[NA]*/ /*See note !!*/
U_HST_LEADING_JAMO, /*[L]*/
U_HST_VOWEL_JAMO, /*[V]*/
diff --git a/icu4c/source/common/unicode/ucnv.h b/icu4c/source/common/unicode/ucnv.h
index 599b7d0a4b2..14ac8021adb 100644
--- a/icu4c/source/common/unicode/ucnv.h
+++ b/icu4c/source/common/unicode/ucnv.h
@@ -810,7 +810,7 @@ ucnv_getStarters(const UConverter* converter,
* @see ucnv_getUnicodeSet
* @stable ICU 2.6
*/
-typedef enum {
+typedef enum UConverterUnicodeSet {
/** Select the set of roundtrippable Unicode code points. @stable ICU 2.6 */
UCNV_ROUNDTRIP_SET,
/** Number of UConverterUnicodeSet selectors. @stable ICU 2.6 */
diff --git a/icu4c/source/common/unicode/udata.h b/icu4c/source/common/unicode/udata.h
index 2097d8da554..0881ef32453 100644
--- a/icu4c/source/common/unicode/udata.h
+++ b/icu4c/source/common/unicode/udata.h
@@ -353,7 +353,7 @@ udata_setAppData(const char *packageName, const void *data, UErrorCode *err);
* @see udata_setFileAccess
* @draft ICU 3.4
*/
-typedef enum {
+typedef enum UDataFileAccess {
/** ICU does not access the file system for data loading. */
UDATA_NO_FILES,
/** ICU only loads data from packages, not from single files. */
diff --git a/icu4c/source/common/unicode/uiter.h b/icu4c/source/common/unicode/uiter.h
index 6062374cebd..42c76677ed7 100644
--- a/icu4c/source/common/unicode/uiter.h
+++ b/icu4c/source/common/unicode/uiter.h
@@ -46,7 +46,7 @@ typedef struct UCharIterator UCharIterator; /**< C typedef for struct UCharItera
* @see UCharIterator
* @stable ICU 2.1
*/
-typedef enum {
+typedef enum UCharIteratorOrigin {
UITER_START, UITER_CURRENT, UITER_LIMIT, UITER_ZERO, UITER_LENGTH
} UCharIteratorOrigin;
diff --git a/icu4c/source/common/unicode/unorm.h b/icu4c/source/common/unicode/unorm.h
index 151a6ea69f9..31c52245116 100644
--- a/icu4c/source/common/unicode/unorm.h
+++ b/icu4c/source/common/unicode/unorm.h
@@ -207,7 +207,7 @@ unorm_normalize(const UChar *source, int32_t sourceLength,
* For details see Unicode Technical Report 15.
* @stable ICU 2.0
*/
-typedef enum {
+typedef enum UNormalizationCheckResult {
/**
* Indicates that string is not in the normalized format
*/
diff --git a/icu4c/source/common/unicode/uscript.h b/icu4c/source/common/unicode/uscript.h
index 1ab5b024653..3420299a023 100644
--- a/icu4c/source/common/unicode/uscript.h
+++ b/icu4c/source/common/unicode/uscript.h
@@ -26,7 +26,7 @@
*
* @stable ICU 2.2
*/
-typedef enum {
+typedef enum UScriptCode {
USCRIPT_INVALID_CODE = -1,
USCRIPT_COMMON = 0 , /* Zyyy */
USCRIPT_INHERITED = 1, /* Qaai */
diff --git a/icu4c/source/common/unicode/utrace.h b/icu4c/source/common/unicode/utrace.h
index 98426f5754d..edf50b0c2f7 100644
--- a/icu4c/source/common/unicode/utrace.h
+++ b/icu4c/source/common/unicode/utrace.h
@@ -37,7 +37,7 @@ U_CDECL_BEGIN
* @see utrace_setLevel
* @stable ICU 2.8
*/
-typedef enum {
+typedef enum UTraceLevel {
/** Disable all tracing @stable ICU 2.8*/
UTRACE_OFF=-1,
/** Trace error conditions only @stable ICU 2.8*/
@@ -56,7 +56,7 @@ typedef enum {
* These are the ICU functions that will be traced when tracing is enabled.
* @stable ICU 2.8
*/
-typedef enum {
+typedef enum UTraceFunctionNumber {
UTRACE_FUNCTION_START=0,
UTRACE_U_INIT=UTRACE_FUNCTION_START,
UTRACE_U_CLEANUP,
diff --git a/icu4c/source/common/unicode/utypes.h b/icu4c/source/common/unicode/utypes.h
index 2163aad5797..2672c74289c 100644
--- a/icu4c/source/common/unicode/utypes.h
+++ b/icu4c/source/common/unicode/utypes.h
@@ -546,7 +546,7 @@ operator delete[](void * /*p*/) {
* Error codes should be tested using U_FAILURE() and U_SUCCESS().
* @stable ICU 2.0
*/
-typedef enum {
+typedef enum UErrorCode {
/* The ordering of U_ERROR_INFO_START Vs U_USING_FALLBACK_WARNING looks weird
* and is that way because VC++ debugger displays first encountered constant,
* which is not the what the code is used for
diff --git a/icu4c/source/i18n/unicode/ucurr.h b/icu4c/source/i18n/unicode/ucurr.h
index d7e150cca8d..ac0d81ea46f 100644
--- a/icu4c/source/i18n/unicode/ucurr.h
+++ b/icu4c/source/i18n/unicode/ucurr.h
@@ -61,7 +61,7 @@ ucurr_forLocale(const char* locale,
* @see ucurr_getName
* @stable ICU 2.6
*/
-typedef enum {
+typedef enum UCurrNameStyle {
/**
* Selector for ucurr_getName indicating a symbolic name for a
* currency, such as "$" for USD.
@@ -170,7 +170,7 @@ ucurr_getRoundingIncrement(const UChar* currency,
* @see ucurr_openCurrencies
* @draft ICU 3.2
*/
-typedef enum {
+typedef enum UCurrCurrencyType {
/**
* Select all ISO-4217 currency codes.
* @draft ICU 3.2
diff --git a/icu4c/source/i18n/unicode/udat.h b/icu4c/source/i18n/unicode/udat.h
index 14c30ee3f0f..ee1f0d50fed 100644
--- a/icu4c/source/i18n/unicode/udat.h
+++ b/icu4c/source/i18n/unicode/udat.h
@@ -139,7 +139,7 @@ typedef void* UDateFormat;
/** The possible date/time format styles
* @stable ICU 2.6
*/
-typedef enum {
+typedef enum UDateFormatStyle {
/** Full style */
UDAT_FULL,
/** Long style */
@@ -162,7 +162,7 @@ typedef enum {
* defined by DateFormat and UDateFormat.
* @draft ICU 3.0
*/
-typedef enum {
+typedef enum UDateFormatField {
/**
* FieldPosition and UFieldPosition selector for 'G' field alignment,
* corresponding to the UCAL_ERA field.
@@ -659,7 +659,7 @@ udat_applyPattern( UDateFormat *format,
* The possible types of date format symbols
* @stable ICU 2.6
*/
-typedef enum {
+typedef enum UDateFormatSymbolType {
/** The era names, for example AD */
UDAT_ERAS,
/** The month names, for example February */
diff --git a/icu4c/source/i18n/unicode/ulocdata.h b/icu4c/source/i18n/unicode/ulocdata.h
index 73a8fa7aa9f..84ba9ee13dd 100644
--- a/icu4c/source/i18n/unicode/ulocdata.h
+++ b/icu4c/source/i18n/unicode/ulocdata.h
@@ -45,20 +45,20 @@ typedef struct ULocaleData {
/** The possible types of exemplar character sets.
* @draft ICU 3.4
*/
-typedef enum {
- ULOCDATA_ES_STANDARD, /** Basic set */
- ULOCDATA_ES_AUXILIARY, /** Auxiliary set */
- ULOCDATA_ES_COUNT
+typedef enum ULocaleDataExemplarSetType {
+ ULOCDATA_ES_STANDARD, /* Basic set */
+ ULOCDATA_ES_AUXILIARY, /* Auxiliary set */
+ ULOCDATA_ES_COUNT
} ULocaleDataExemplarSetType;
/** The possible types of delimiters.
* @draft ICU 3.4
*/
-typedef enum {
- ULOCDATA_QUOTATION_START, /** Quotation start */
- ULOCDATA_QUOTATION_END, /** Quotation end */
- ULOCDATA_ALT_QUOTATION_START, /** Alternate quotation start */
- ULOCDATA_ALT_QUOTATION_END, /** Alternate quotation end */
+typedef enum ULocaleDataDelimiterType {
+ ULOCDATA_QUOTATION_START, /* Quotation start */
+ ULOCDATA_QUOTATION_END, /* Quotation end */
+ ULOCDATA_ALT_QUOTATION_START, /* Alternate quotation start */
+ ULOCDATA_ALT_QUOTATION_END, /* Alternate quotation end */
ULOCDATA_DELIMITER_COUNT
} ULocaleDataDelimiterType;
@@ -160,7 +160,7 @@ ulocdata_getDelimiter(ULocaleData *uld, ULocaleDataDelimiterType type, UChar *re
* Enumeration for representing the measurement systems.
* @draft ICU 2.8
*/
-typedef enum {
+typedef enum UMeasurementSystem {
UMS_SI, /** Measurement system specified by SI otherwise known as Metric system. */
UMS_US, /** Measurement system followed in the United States of America. */
UMS_LIMIT
diff --git a/icu4c/source/i18n/unicode/unum.h b/icu4c/source/i18n/unicode/unum.h
index 9b46eb8d6b6..e699adb3d41 100644
--- a/icu4c/source/i18n/unicode/unum.h
+++ b/icu4c/source/i18n/unicode/unum.h
@@ -130,7 +130,7 @@ typedef void* UNumberFormat;
/** The possible number format styles.
* @stable ICU 2.0
*/
-typedef enum {
+typedef enum UNumberFormatStyle {
/**
* Decimal format defined by pattern
* @draft ICU 3.0
@@ -170,7 +170,7 @@ typedef enum {
/** The possible number format rounding modes.
* @stable ICU 2.0
*/
-typedef enum {
+typedef enum UNumberFormatRoundingMode {
UNUM_ROUND_CEILING,
UNUM_ROUND_FLOOR,
UNUM_ROUND_DOWN,
@@ -183,7 +183,7 @@ typedef enum {
/** The possible number format pad positions.
* @stable ICU 2.0
*/
-typedef enum {
+typedef enum UNumberFormatPadPosition {
UNUM_PAD_BEFORE_PREFIX,
UNUM_PAD_AFTER_PREFIX,
UNUM_PAD_BEFORE_SUFFIX,
@@ -518,7 +518,7 @@ U_CAPI int32_t U_EXPORT2
unum_countAvailable(void);
/** The possible UNumberFormat numeric attributes @stable ICU 2.0 */
-typedef enum {
+typedef enum UNumberFormatAttribute {
/** Parse integers only */
UNUM_PARSE_INT_ONLY,
/** Use grouping separator */
@@ -649,7 +649,7 @@ unum_setDoubleAttribute( UNumberFormat* fmt,
double newValue);
/** The possible UNumberFormat text attributes @stable ICU 2.0*/
-typedef enum {
+typedef enum UNumberFormatTextAttribute {
/** Positive prefix */
UNUM_POSITIVE_PREFIX,
/** Positive suffix */
@@ -754,7 +754,7 @@ unum_toPattern( const UNumberFormat* fmt,
* Constants for specifying a number format symbol.
* @stable ICU 2.0
*/
-typedef enum {
+typedef enum UNumberFormatSymbol {
/** The decimal separator */
UNUM_DECIMAL_SEPARATOR_SYMBOL,
/** The grouping separator */
diff --git a/icu4c/source/i18n/unicode/uregex.h b/icu4c/source/i18n/unicode/uregex.h
index 84dc1eb4b4a..6a44080c6ca 100644
--- a/icu4c/source/i18n/unicode/uregex.h
+++ b/icu4c/source/i18n/unicode/uregex.h
@@ -46,7 +46,7 @@ typedef struct URegularExpression URegularExpression;
* Constants for Regular Expression Match Modes.
* @stable ICU 2.4
*/
-typedef enum {
+typedef enum URegexpFlag{
/** Forces normalization of pattern and strings.
Not implemented yet, just a placeholder, hence draft.
@draft ICU 2.4 */
diff --git a/icu4c/source/i18n/unicode/utmscale.h b/icu4c/source/i18n/unicode/utmscale.h
index 7d0972dfc7c..36d4ea493d6 100644
--- a/icu4c/source/i18n/unicode/utmscale.h
+++ b/icu4c/source/i18n/unicode/utmscale.h
@@ -192,7 +192,7 @@
*
* @draft ICU 3.2
*/
-typedef enum {
+typedef enum UDateTimeScale {
/**
* Used in the JDK. Data is a Java long
(int64_t
). Value
* is milliseconds since January 1, 1970.
@@ -281,7 +281,7 @@ typedef enum {
*
* @draft ICU 3.2
*/
-typedef enum {
+typedef enum UTimeScaleValue {
/**
* The constant used to select the units vale
* for a time scale.
diff --git a/icu4c/source/i18n/unicode/utrans.h b/icu4c/source/i18n/unicode/utrans.h
index 0cb5a2994a9..a460a34c5b7 100644
--- a/icu4c/source/i18n/unicode/utrans.h
+++ b/icu4c/source/i18n/unicode/utrans.h
@@ -73,7 +73,7 @@ typedef void* UTransliterator;
* B to A when operating in the reverse direction.
* @stable ICU 2.0
*/
-typedef enum {
+typedef enum UTransDirection {
/**
* UTRANS_FORWARD means from <source> to <target> for a