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

            Bug ID: 68819
           Summary: Invalid "-Wmisleading-indentation" warning if code is
                    all in one line
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: dmalcolm at gcc dot gnu.org
  Target Milestone: ---

I get the following bogus warning:

Quadtree.h:210:0: warning: statement is indented as if it were guarded by...
[-Wmisleading-indentation]
   unsigned int  get_max_index() const   { if (ul) return 4; return 0; }


Quadtree.h:210:0: note: ...this ‘if’ clause, but it is not


For some reasons, a quick attempt to create a test case failed. I think it has
something to do with the reason that the column number is 0. I also do not get
it for all "Quadtree<T>" but only once for project. BTW, "ul" is defined as:
  QuadtreeT<T, C>      *ul;


I will try to create a working reduced example.

Reply via email to