Add wxGCC_WARNING_{SUPPRESS,RESTORE} macros and use them for -Wfloat-equal.

Suppress the warnings about comparing floating point values for equality in
wxWidgets headers when the user code is compiled with -Wfloat-equal (at least
when using g++ 4.6 or later).

Closes #14895.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-12-28 00:44:01 +00:00
parent e14c510570
commit 33f9dbda89
3 changed files with 27 additions and 1 deletions

View File

@@ -107,8 +107,9 @@
}
#else /* !__INTELC__ */
wxGCC_WARNING_SUPPRESS(float-equal)
inline bool wxIsSameDouble(double x, double y) { return x == y; }
wxGCC_WARNING_RESTORE(float-equal)
#endif /* __INTELC__/!__INTELC__ */