You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Three unused constants in double-conversion/strod.cpp produce build error with -Wall -Werror -Wunused-const-variable #122
This problem was discovered in ICU project that uses double-conversion library, original discussion thread can be found here: unicode-org/icu#956.
The issue is described below:
There are three constants in double-conversion-strod.cpp that are used only if DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS is defined.
I.e. kMaxExactDoubleIntegerDecimalDigits variable (and two others) are only used inside the else part of #if !defined(DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS). This leads to a compile error when -Wall -Werror enabled:
double-conversion/strtod.cpp:55:18: error: unused variable 'kMaxExactDoubleIntegerDecimalDigits' [-Werror,-Wunused-const-variable]
static const int kMaxExactDoubleIntegerDecimalDigits = 15;
double-conversion/strtod.cpp:72:21: error: variable 'exact_powers_of_ten' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
static const double exact_powers_of_ten[] = {
double-conversion/strtod.cpp:98:18: error: unused variable 'kExactPowersOfTenSize' [-Werror,-Wunused-const-variable]
static const int kExactPowersOfTenSize = DOUBLE_CONVERSION_ARRAY_SIZE(exact_powers_of_ten);
Activity
Fix strtod.cc undefined constants
Fix strtod.cc undefined constants (#123)
ENH: Update Double-convert third-party
ENH: Update Double-convert third-party
ENH: Update Double-convert third-party
ENH: Update Double-convert third-party
ENH: Update Double-convert third-party