diff --git a/include/internal/catch_matchers_floating.cpp b/include/internal/catch_matchers_floating.cpp index 68fd1bda..c226fc56 100644 --- a/include/internal/catch_matchers_floating.cpp +++ b/include/internal/catch_matchers_floating.cpp @@ -188,9 +188,10 @@ namespace Floating { ret << ", "; write(ret, step(m_target, static_cast( INFINITY), m_ulps)); } else { - write(ret, step(static_cast(m_target), -INFINITY, m_ulps)); + // We have to cast INFINITY to float because of MinGW, see #1782 + write(ret, step(static_cast(m_target), static_cast(-INFINITY), m_ulps)); ret << ", "; - write(ret, step(static_cast(m_target), INFINITY, m_ulps)); + write(ret, step(static_cast(m_target), static_cast( INFINITY), m_ulps)); } ret << "])";