From: "Martin Liška" <mliska@suse.cz>
To: gcc-patches@gcc.gnu.org
Cc: gnu@amylaar.uk
Subject: [PATCH] epiphany: fix -Wimplicit-fallthrough warnings in epiphany.c.
Date: Wed, 12 Jan 2022 10:56:31 +0100 [thread overview]
Message-ID: <03380edf-3c4f-4d2c-c59a-4e967b7cf9ee@suse.cz> (raw)
This is RFC.
Cheers,
Martin
gcc/ChangeLog:
* config/epiphany/epiphany.c (epiphany_mode_priority):
Use gcc_unreachable for not handled cases.
---
gcc/config/epiphany/epiphany.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gcc/config/epiphany/epiphany.c b/gcc/config/epiphany/epiphany.c
index a2743436f38..88283419dc1 100644
--- a/gcc/config/epiphany/epiphany.c
+++ b/gcc/config/epiphany/epiphany.c
@@ -2369,6 +2369,7 @@ epiphany_mode_priority (int entity, int priority)
case 2: return (epiphany_normal_fp_rounding == FP_MODE_ROUND_NEAREST
? FP_MODE_ROUND_TRUNC : FP_MODE_ROUND_NEAREST);
case 3: return FP_MODE_CALLER;
+ default: gcc_unreachable ();
}
case FP_MODE_ROUND_NEAREST:
case FP_MODE_CALLER:
@@ -2378,6 +2379,7 @@ epiphany_mode_priority (int entity, int priority)
case 1: return FP_MODE_ROUND_TRUNC;
case 2: return FP_MODE_INT;
case 3: return FP_MODE_CALLER;
+ default: gcc_unreachable ();
}
case FP_MODE_ROUND_TRUNC:
switch (priority)
@@ -2386,6 +2388,7 @@ epiphany_mode_priority (int entity, int priority)
case 1: return FP_MODE_ROUND_NEAREST;
case 2: return FP_MODE_INT;
case 3: return FP_MODE_CALLER;
+ default: gcc_unreachable ();
}
case FP_MODE_ROUND_UNKNOWN:
case FP_MODE_NONE:
--
2.34.1
next reply other threads:[~2022-01-12 9:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-12 9:56 Martin Liška [this message]
2022-01-12 16:21 ` Jeff Law
2022-01-12 9:56 Martin Liška
2022-01-12 9:57 ` Martin Liška
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=03380edf-3c4f-4d2c-c59a-4e967b7cf9ee@suse.cz \
--to=mliska@suse.cz \
--cc=gcc-patches@gcc.gnu.org \
--cc=gnu@amylaar.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).