[Bug c/69415] -Wmisleading-indentation warns on "if (__b < __a) return __b; return __a;"

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 22 16:05:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69415

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think the people who would be generally expecting indentation to mean
something would not use a one liner, but instead
  if (foo)
    stmt
    stmt2
and if it is a one-liner, it is just much more likely that one simply wanted to
stick more stuff one a single line.  Perhaps have different
-Wmisleading-indentation levels and warn about this only in some non-default
2nd level, not the first one?


More information about the Gcc-bugs mailing list