This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Some real-life feedback on -Wmisleading-indentation


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
compilation).

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.

Cheers,

Manuel.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]