Are you using /fp:fast (MSVC) or -Ofast (Clang)? If so, the compiler may assume that -0.f is the same as 0.f because it may not follow IEEE-754 strictly. In fact, Clang 18.1.8 tells me that JUCE 8.0.6 itself shows a warning with -Ofast. See:
/fp:fast
-Ofast
-0.f
0.f