Closed Bug 1393216 Opened 2 years ago Closed 2 years ago
When compiling for Windows with gcc, we encounter lots of #pragma warning's - which generate warnings
59 bytes, text/x-review-board-request
MSVC supports #pragma warning() which is used to enable or disable warnings in a very nuanced way. https://msdn.microsoft.com/en-us/library/2c8f766e.aspx gcc doesn't recognize these, and generates a warning saying 'Unknown Pragma'
Try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d3499293ef67ca1d4000f2f7f905a13fe55f44b4 (The build will break, but the log shouldn't have any 'ignoring #pragma warning')
Comment on attachment 8900451 [details] Bug 1393216 Disable unknown pragma warnings when compiling for Windows with gcc https://reviewboard.mozilla.org/r/171810/#review177048 r=me with the change below. ::: build/moz.configure/warnings.configure:112 (Diff revision 1) > # 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 hit lots of #pragma warning's which gcc does not recognize Nit: maybe "...lots of "#pragma warning"s, which is an MSVC-only pragma thatn GCC does not recognize." The quoting of "#pragma warning" is important here, I think. (Note that we disable the warning on clang-cl too, for much the same reason.)
Attachment #8900451 - Flags: review?(nfroyd) → review+
Autoland can't push this until all pending issues in MozReview are marked as resolved.
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/3dcae3969da1 Disable unknown pragma warnings when compiling for Windows with gcc r=froydnj
You need to log in before you can comment on or make changes to this bug.