Bug 1393216 Disable unknown pragma warnings when compiling for Windows with gcc r?froydnj
MozReview-Commit-ID: 6cZ96xe4h8C
old mode 100644
new mode 100755
--- a/build/moz.configure/warnings.configure
+++ b/build/moz.configure/warnings.configure
@@ -104,16 +104,21 @@ check_and_add_gcc_warning('-Wno-error=fr
# catches format/argument mismatches with printf
check_and_add_gcc_warning('-Wformat')
# We use mix of both POSIX and Win32 printf format across the tree, so format
# warnings are useless on mingw.
check_and_add_gcc_warning('-Wno-format',
when=depends(target)(lambda t: t.kernel == 'WINNT'))
+# When compiling for Windows with gcc, we encounter lots of "#pragma warning"'s
+# which is an MSVC-only pragma that GCC does not recognize.
+check_and_add_gcc_warning('-Wno-unknown-pragmas',
+ when=depends(target)(lambda t: t.kernel == 'WINNT'))
+
# We hit this all over the place with the gtest INSTANTIATE_TEST_CASE_P macro
check_and_add_gcc_warning('-Wno-gnu-zero-variadic-macro-arguments')
# Add compile-time warnings for unprotected functions and format functions
# that represent possible security problems
check_and_add_gcc_warning('-Wformat-security')
check_and_add_gcc_warning('-Wformat-overflow=2')