* [PATCH] epiphany: fix -Wimplicit-fallthrough warnings in epiphany.c.
@ 2022-01-12 9:56 Martin Liška
2022-01-12 16:21 ` Jeff Law
0 siblings, 1 reply; 4+ messages in thread
From: Martin Liška @ 2022-01-12 9:56 UTC (permalink / raw)
To: gcc-patches; +Cc: gnu
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] epiphany: fix -Wimplicit-fallthrough warnings in epiphany.c.
2022-01-12 9:56 [PATCH] epiphany: fix -Wimplicit-fallthrough warnings in epiphany.c Martin Liška
@ 2022-01-12 16:21 ` Jeff Law
0 siblings, 0 replies; 4+ messages in thread
From: Jeff Law @ 2022-01-12 16:21 UTC (permalink / raw)
To: Martin Liška, gcc-patches; +Cc: gnu
On 1/12/2022 2:56 AM, Martin Liška wrote:
> This is RFC.
>
> Cheers,
> Martin
>
> gcc/ChangeLog:
>
> * config/epiphany/epiphany.c (epiphany_mode_priority):
> Use gcc_unreachable for not handled cases.
OK. As are similar changes in other ports.
jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] epiphany: fix -Wimplicit-fallthrough warnings in epiphany.c.
2022-01-12 9:56 Martin Liška
@ 2022-01-12 9:57 ` Martin Liška
0 siblings, 0 replies; 4+ messages in thread
From: Martin Liška @ 2022-01-12 9:57 UTC (permalink / raw)
To: gcc-patches; +Cc: gnu
On 1/12/22 10:56, Martin Liška wrote:
> This fixes -Wformat-diag warnings.
>
> Ready to be installed?
> Thanks,
> Martin
Please forget about this email, it's a dup.
Martin
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] epiphany: fix -Wimplicit-fallthrough warnings in epiphany.c.
@ 2022-01-12 9:56 Martin Liška
2022-01-12 9:57 ` Martin Liška
0 siblings, 1 reply; 4+ messages in thread
From: Martin Liška @ 2022-01-12 9:56 UTC (permalink / raw)
To: gcc-patches; +Cc: gnu
This fixes -Wformat-diag warnings.
Ready to be installed?
Thanks,
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-12 16:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12 9:56 [PATCH] epiphany: fix -Wimplicit-fallthrough warnings in epiphany.c Martin Liška
2022-01-12 16:21 ` Jeff Law
2022-01-12 9:56 Martin Liška
2022-01-12 9:57 ` Martin Liška
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).