[Bug c/79227] Questionable -Wmisleading-indentation diagnostic in HSAIL-Tools

dmalcolm at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 25 15:41:00 GMT 2017


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

--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Created attachment 40579
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40579&action=edit
Patch to tweak Wmisleading indentation

This patch removes the "(guard_exploc.line == body_exploc.line)" condition from
the:
          /* Heuristic: only warn if the guard is the first thing
             on its line.  */

and hence silences the warning from the reproducer.  It doesn't introduce any
regressions in the testsuite (only tested briefly, though).

[Would need ChangeLog, and testsuite coverage]


Patrick, any thoughts?


More information about the Gcc-bugs mailing list