aboutsummaryrefslogtreecommitdiff
path: root/gcc/internal-fn.c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2016-09-26 09:42:50 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2016-09-26 09:42:50 +0000
commit81fea426da8c4687bb32e6894dc26f00ae211822 (patch)
tree8b84b3de175727d09b7dcf1b5703e0d46b64f9e7 /gcc/internal-fn.c
parent392fa55c799358e198ca85fbea548e60359133c5 (diff)
downloadgcc-81fea426da8c4687bb32e6894dc26f00ae211822.zip
gcc-81fea426da8c4687bb32e6894dc26f00ae211822.tar.gz
gcc-81fea426da8c4687bb32e6894dc26f00ae211822.tar.bz2
Implement -Wimplicit-fallthrough.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r240485
Diffstat (limited to 'gcc/internal-fn.c')
-rw-r--r--gcc/internal-fn.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c
index c269ca6..029a534 100644
--- a/gcc/internal-fn.c
+++ b/gcc/internal-fn.c
@@ -244,6 +244,15 @@ expand_TSAN_FUNC_EXIT (internal_fn, gcall *)
gcc_unreachable ();
}
+/* This should get expanded in the lower pass. */
+
+static void
+expand_FALLTHROUGH (internal_fn, gcall *call)
+{
+ error_at (gimple_location (call),
+ "invalid use of attribute %<fallthrough%>");
+}
+
/* Helper function for expand_addsub_overflow. Return 1
if ARG interpreted as signed in its precision is known to be always
positive or 2 if ARG is known to be always negative, or 3 if ARG may