Closed
Bug 1297639
Opened 8 years ago
Closed 6 years ago
Make -Wmisleading-indentation a fatal error
Categories
(Firefox Build System :: General, defect)
Firefox Build System
General
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla61
People
(Reporter: nical, Unassigned)
References
Details
This type of code:
> if (cond)
> foo();
> return;
Is very bad, and is caught by gcc as a warning, at least in the version of gcc installed by default in the current fedora, with the -Wmisleading-indentation warning.
We should not let this type of thing land. I hope that which ever version of the compiler we use on try has the same warning so that we can turn it into an error.
Reporter | ||
Comment 1•8 years ago
|
||
The warning was introduced with gcc6 and there's clang bug open here https://llvm.org/bugs/show_bug.cgi?id=23910 so it looks like clang does not have it yet.
Reporter | ||
Updated•8 years ago
|
Reporter | ||
Updated•8 years ago
|
Updated•7 years ago
|
Product: Core → Firefox Build System
Comment 3•6 years ago
|
||
We are now using gcc 6.1 and -Wmisleading-indentation is enabled by -Wall. clang doesn't support the -Wmisleading-indentation flag, but clang-tidy does a similar indentation check: https://clang.llvm.org/extra/clang-tidy/checks/readability-misleading-indentation.html
Status: NEW → RESOLVED
Closed: 6 years ago
Depends on: gcc-6.1
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Comment 4•6 years ago
|
||
Which is enabled at dev / review phease: https://dxr.mozilla.org/mozilla-central/source/tools/clang-tidy/config.yaml#76
You need to log in
before you can comment on or make changes to this bug.
Description
•