This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/66454] New: Common -Wmisleading-indentation false-positive triggered in the Linux kernel
- From: "patrick at parcs dot ath.cx" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 08 Jun 2015 01:15:57 +0000
- Subject: [Bug c/66454] New: Common -Wmisleading-indentation false-positive triggered in the Linux kernel
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66454
Bug ID: 66454
Summary: Common -Wmisleading-indentation false-positive
triggered in the Linux kernel
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: patrick at parcs dot ath.cx
Target Milestone: ---
The following test case is a template exhibiting the kind of code in the Linux
kernel that often triggers a -Wmisleading-indentation false-positive:
int *p;
void
foo (int n)
{
if (p) {
foo (1);
} else
if (p)
foo (2);
foo (3);
}
indentation.c: In function âfooâ:
indentation.c:13:5: warning: statement is indented as if it were guarded by...
[-Wmisleading-indentation]
foo (3);
^
indentation.c:10:7: note: ...this âelseâ clause, but it is not
} else
^