aboutsummaryrefslogtreecommitdiff
path: root/gcc/convert.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/convert.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/convert.c')
-rw-r--r--gcc/convert.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/convert.c b/gcc/convert.c
index e6b4d29..8f18ee4 100644
--- a/gcc/convert.c
+++ b/gcc/convert.c
@@ -164,6 +164,7 @@ convert_to_real_1 (tree type, tree expr, bool fold_p)
-fmath-errno. */
if (flag_errno_math)
break;
+ gcc_fallthrough ();
CASE_MATHFN (ACOS)
CASE_MATHFN (ACOSH)
CASE_MATHFN (ASIN)
@@ -184,6 +185,7 @@ convert_to_real_1 (tree type, tree expr, bool fold_p)
/* The above functions are not safe to do this conversion. */
if (!flag_unsafe_math_optimizations)
break;
+ gcc_fallthrough ();
CASE_MATHFN (SQRT)
CASE_MATHFN (FABS)
CASE_MATHFN (LOGB)
@@ -516,7 +518,7 @@ convert_to_integer_1 (tree type, tree expr, bool dofold)
/* Only convert nearbyint* if we can ignore math exceptions. */
if (flag_trapping_math)
break;
- /* ... Fall through ... */
+ gcc_fallthrough ();
CASE_FLT_FN (BUILT_IN_RINT):
/* Only convert in ISO C99 mode and with -fno-math-errno. */
if (!targetm.libc_has_function (function_c99_misc) || flag_errno_math)