This is the mail archive of the
mailing list for the GCC project.
Re: Some real-life feedback on -Wmisleading-indentation
- From: Manuel LÃpez-IbÃÃez <lopezibanez at gmail dot com>
- To: Gerald Pfeifer <gerald at pfeifer dot com>, David Malcolm <dmalcolm at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Mon, 11 Jan 2016 18:09:22 +0000
- Subject: Re: Some real-life feedback on -Wmisleading-indentation
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 20 dot 1601101928330 dot 5144 at anthias>
On 11/01/16 07:20, Gerald Pfeifer wrote:
This is from the Wine testsuite, and the if (0) in colum one guards
one invication of the function under test that would crash (so is
the equivalent of #if 0...#endif, except that it avoids conditional
Perhaps a good heuristic is to disable the warning if the 'if' starts at the
first column. Surely, such code is "special"!
About the blank line heuristic, either include it by default or not at all. I
really dislike the idea of having several levels: it just shows that we could
not decide for robust heuristics or there are limitations in the current
implementation that no one is willing to fix (talking here about other warnings
with numerical levels). What goes in each level becomes arbitrary, and
non-default levels are rarely used.