This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/68819] New: Invalid "-Wmisleading-indentation" warning if code is all in one line
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 09 Dec 2015 16:08:57 +0000
- Subject: [Bug c++/68819] New: Invalid "-Wmisleading-indentation" warning if code is all in one line
- Auto-submitted: auto-generated
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.