re PR c++/77886 (-Wimplicit-fallthrough: breaks duff's device (in function templates))
authorJakub Jelinek <jakub@redhat.com>
Mon, 31 Oct 2016 13:39:49 +0000 (14:39 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 31 Oct 2016 13:39:49 +0000 (14:39 +0100)
commite8d8d3c8bfae148448cd3108db3cc15434137393
treea034281920dc69d1e7d899387cf06c478db69a6b
parent84ff4775d41b716c1b862d4d91ff69127686b668
re PR c++/77886 (-Wimplicit-fallthrough: breaks duff's device (in function templates))

PR c++/77886
* pt.c (tsubst_expr) <case CASE_LABEL_EXPR> Copy over
FALLTHROUGH_LABEL_P flag to the new LABEL_DECL.
(tsubst_expr) <case LABEL_EXPR>: Likewise.

* g++.dg/warn/Wimplicit-fallthrough-2.C: New test.

From-SVN: r241700
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/g++.dg/warn/Wimplicit-fallthrough-2.C [new file with mode: 0644]