Closed
Bug 1235717
(Wunreachable-code)
Opened 10 years ago
Closed 10 years ago
Enable clang's -Wunreachable-code warnings
Categories
(Firefox Build System :: General, defect)
Firefox Build System
General
Tracking
(firefox46 fixed)
RESOLVED
FIXED
mozilla46
| Tracking | Status | |
|---|---|---|
| firefox46 | --- | fixed |
People
(Reporter: cpeterson, Assigned: cpeterson)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
|
4.64 KB,
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
mozilla-central is (almost! :) free of the following clang -Wunreachable-code warnings:
-Wunreachable-code
-Wunreachable-code-loop-increment
-Wunreachable-code-return
Unfortunately, there are still hundreds of -Wunreachable-code-break warnings in the IDL bindings' generated code. clang's meta warning flag -Wunreachable-code-aggressive enables all of the above warnings.
https://github.com/llvm-mirror/clang/blob/73e51e88d5ed202c6c828d88371f2d694fd9826a/include/clang/Basic/DiagnosticGroups.td#L516
gcc removed support for its -Wunreachable-code warning flag back in 2010 (gcc 4.5) because it produced different results for different -O optimization levels:
https://gcc.gnu.org/ml/gcc-help/2011-05/msg00362.html
MSVC has an optional warning for unreachable code (C4702), but it is impractical because there are unreachable code warnings in VS2013's own standard library header files.
https://msdn.microsoft.com/en-us/library/c26da40e.aspx
Here is a green Try build with -Wunreachable-code enabled:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=7892fcd8ca78
Attachment #8702794 -
Flags: review?(mh+mozilla)
Updated•10 years ago
|
Attachment #8702794 -
Flags: review?(mh+mozilla) → review+
Comment 2•10 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox46:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
| Assignee | ||
Updated•10 years ago
|
| Assignee | ||
Updated•10 years ago
|
Updated•8 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•