Closed
Bug 1393216
Opened 8 years ago
Closed 8 years ago
When compiling for Windows with gcc, we encounter lots of #pragma warning's - which generate warnings
Categories
(Core :: General, defect)
Core
General
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: tjr, Assigned: tjr)
References
Details
(Whiteboard: [tor])
Attachments
(1 file)
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'
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•8 years ago
|
||
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 3•8 years ago
|
||
mozreview-review |
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+
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 5•8 years ago
|
||
Autoland can't push this until all pending issues in MozReview are marked as resolved.
Flags: needinfo?(tom)
Keywords: checkin-needed
Assignee | ||
Updated•8 years ago
|
Flags: needinfo?(tom)
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/3dcae3969da1
Disable unknown pragma warnings when compiling for Windows with gcc r=froydnj
Keywords: checkin-needed
Comment 7•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in
before you can comment on or make changes to this bug.
Description
•