[Bug c/91915] New warning for duplicate if condition in if-elseif-elseif chain
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91915 Martin Liška changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #5 from Martin Liška --- Implemented.
[Bug c/91915] New warning for duplicate if condition in if-elseif-elseif chain
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91915 --- Comment #4 from Martin Liška --- Great, thank you Marek!
[Bug c/91915] New warning for duplicate if condition in if-elseif-elseif chain
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91915 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org --- Comment #3 from Eric Gallager --- (In reply to Marek Polacek from comment #2) > I already implemented such a warning in r228388: > > w.c: In function ‘foo’: > w.c:11:17: warning: duplicated ‘if’ condition [-Wduplicated-cond] >11 | else if (argc == 1) > |~^~~~ > w.c:6:12: note: previously used here > 6 | if (argc == 1) > | ~^~~~ so in that case this would be bug 87656
[Bug c/91915] New warning for duplicate if condition in if-elseif-elseif chain
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91915 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment #2 from Marek Polacek --- I already implemented such a warning in r228388: w.c: In function ‘foo’: w.c:11:17: warning: duplicated ‘if’ condition [-Wduplicated-cond] 11 | else if (argc == 1) |~^~~~ w.c:6:12: note: previously used here 6 | if (argc == 1) | ~^~~~
[Bug c/91915] New warning for duplicate if condition in if-elseif-elseif chain
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91915 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2019-09-26 Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Martin Liška --- I can work on that as I'm right now working on a new if to switch conversion pass.