Compilation error when UCONFIG_NO_FORMATTING is set to 1

Description

Found during BRS uconfig.h variation test:
In file included from listformatter.cpp:21:
./unicode/listformatter.h:200:29: error: unknown type name 'UListFormatterType'; did you mean 'ListFormatter'?
const Locale& locale, UListFormatterType type, UListFormatterWidth width, UErrorCode& errorCode);
^~~~~~~~~~~~~~~~~~
ListFormatter
./unicode/listformatter.h:151:18: note: 'ListFormatter' declared here
class U_I18N_API ListFormatter : public UObject{
^
./unicode/listformatter.h:200:54: error: unknown type name 'UListFormatterWidth'; did you mean 'ListFormatter'?
const Locale& locale, UListFormatterType type, UListFormatterWidth width, UErrorCode& errorCode);
^~~~~~~~~~~~~~~~~~~
ListFormatter
./unicode/listformatter.h:151:18: note: 'ListFormatter' declared here
class U_I18N_API ListFormatter : public UObject{
^
listformatter.cpp:351:43: error: unknown type name 'UListFormatterType'; did you mean 'ListFormatter'?
static const char* typeWidthToStyleString(UListFormatterType type, UListFormatterWidth width) {
^~~~~~~~~~~~~~~~~~
ListFormatter
./unicode/listformatter.h:151:18: note: 'ListFormatter' declared here
class U_I18N_API ListFormatter : public UObject{
^
listformatter.cpp:351:68: error: unknown type name 'UListFormatterWidth'; did you mean 'ListFormatter'?
static const char* typeWidthToStyleString(UListFormatterType type, UListFormatterWidth width) {
^~~~~~~~~~~~~~~~~~~
ListFormatter
./unicode/listformatter.h:151:18: note: 'ListFormatter' declared here
class U_I18N_API ListFormatter : public UObject{
^
listformatter.cpp:352:5: error: statement requires expression of integer type ('icu_67::ListFormatter' invalid)
switch (type) {
^ ~~~~
listformatter.cpp:354:13: error: statement requires expression of integer type
('icu_67::ListFormatter' invalid)
switch (width) {
^ ~~~~~
listformatter.cpp:367:13: error: statement requires expression of integer type
('icu_67::ListFormatter' invalid)
switch (width) {
^ ~~~~~
clang++ ... translit.cpp
listformatter.cpp:380:13: error: statement requires expression of integer type
('icu_67::ListFormatter' invalid)
switch (width) {
^ ~~~~~
listformatter.cpp:514:35: error: use of undeclared identifier 'ULISTFMT_TYPE_AND'
return createInstance(locale, ULISTFMT_TYPE_AND, ULISTFMT_WIDTH_WIDE, errorCode);
^
listformatter.cpp:514:54: error: use of undeclared identifier 'ULISTFMT_WIDTH_WIDE'
return createInstance(locale, ULISTFMT_TYPE_AND, ULISTFMT_WIDTH_WIDE, errorCode);
^
listformatter.cpp:518:31: error: unknown type name 'UListFormatterType'; did you mean 'ListFormatter'?
const Locale& locale, UListFormatterType type, UListFormatterWidth width, UErrorCode& errorCode) {
^~~~~~~~~~~~~~~~~~
ListFormatter
./unicode/listformatter.h:151:18: note: 'ListFormatter' declared here
class U_I18N_API ListFormatter : public UObject{
^
listformatter.cpp:518:56: error: unknown type name 'UListFormatterWidth'; did you mean 'ListFormatter'?
const Locale& locale, UListFormatterType type, UListFormatterWidth width, UErrorCode& errorCode) {
^

Activity

Show:
Norbert Runge
April 2, 2020, 9:52 PM

Another compilation error when executing the BRS header test with UCONFIG_NO_FORMATTING 1

ctest unicode/udatpg.h

In file included from ht_stub_ctest.c:1:

/tmp/hdrtst/include/unicode/udatpg.h:669:9: error: unknown type name 'UDateFormatHourCycle'

U_DRAFT UDateFormatHourCycle U_EXPORT2

^

1 error generated.

Fixed
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Craig Cornelius

Reporter

Norbert Runge

Components

Priority

major

Time Needed

Hours

Fix versions