Using a mingw-w64 port of gcc, I get the same 2 warnings on Windows when running lib/locale.t.
However, I don't get any test failures.
I think the warnings are harmless as they are inevitable when you compare an undefined value (namely $Config{d_has_C_UTF8}) using the 'eq' operator && warnings are enabled.
But the test failures are certainly worthy of a perlbug report as
Anonymous Monk has suggested.
Perhaps first try
the latest devel release in case it has already been fixed.
Cheers,
Rob