]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR c++/87068 - missing diagnostic with fallthrough statement.
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Feb 2019 22:29:42 +0000 (22:29 +0000)
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Feb 2019 22:29:42 +0000 (22:29 +0000)
commitdff6bd3872c2e593fdd9fe7779f627b01813df46
treed36b846330e81bbc43a80c1d99385e483956dabf
parent35e99d5d3bd98eb2e2cee5d94ba09b6166dbeab2
PR c++/87068 - missing diagnostic with fallthrough statement.
* gimplify.c (expand_FALLTHROUGH_r): If IFN_FALLTHROUGH was found
at the end of a seq, save its location to walk_stmt_info.
(expand_FALLTHROUGH): Warn if IFN_FALLTHROUGH is at the end of
a switch.

* c-c++-common/Wimplicit-fallthrough-37.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269288 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wimplicit-fallthrough-37.c [new file with mode: 0644]