[Bug c++/87068] No diagnostic on an ill-formed [[fallthrough]]

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Feb 28 22:30:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87068

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Thu Feb 28 22:29:42 2019
New Revision: 269288

URL: https://gcc.gnu.org/viewcvs?rev=269288&root=gcc&view=rev
Log:
        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.

Added:
    trunk/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-37.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gimplify.c
    trunk/gcc/testsuite/ChangeLog


More information about the Gcc-bugs mailing list