diff --git a/include/wx/valnum.h b/include/wx/valnum.h index 3f9be1d99c..2e05bc6b15 100644 --- a/include/wx/valnum.h +++ b/include/wx/valnum.h @@ -228,10 +228,16 @@ private: // wxNUM_VAL_ZERO_AS_BLANK flag. wxString NormalizeValue(LongestValueType value) const { + // We really want to compare with the exact 0 here, so disable gcc + // warning about doing this. + wxGCC_WARNING_SUPPRESS(float-equal) + wxString s; if ( value != 0 || !BaseValidator::HasFlag(wxNUM_VAL_ZERO_AS_BLANK) ) s = this->ToString(value); + wxGCC_WARNING_RESTORE(float-equal) + return s; }