[COMMITTED] libgcc: cris: config/cris/arit.c (DS): Apply attribute __fallthrough__.
diff mbox series

Message ID 202001181542.00IFgCk1005902@ignucius.se.axis.com
State New
Headers show
Series
  • [COMMITTED] libgcc: cris: config/cris/arit.c (DS): Apply attribute __fallthrough__.
Related show

Commit Message

Hans-Peter Nilsson Jan. 18, 2020, 3:42 p.m. UTC
libgcc:
	* config/cris/arit.c (DS): Apply attribute __fallthrough__.

Without this, there are, for each compilation of arit.c, 30ish
occurrences of "this statement may fall through
[-Wimplicit-fallthrough=]", for lines that look like
    case 32: DS; case 31: DS; case 30: DS; case 29: DS;

Noticed while working on the cc0 transition.  Looks like I don't
inspect the logs often.

Adding -Werror to libgcc build-options should perhaps be
considered?

---
 libgcc/config/cris/arit.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/libgcc/config/cris/arit.c b/libgcc/config/cris/arit.c
index ba1c1e7..3369559 100644
--- a/libgcc/config/cris/arit.c
+++ b/libgcc/config/cris/arit.c
@@ -128,7 +128,8 @@  do_31div (unsigned long a, unsigned long b)
      i.e. "a - (b - 1) == (a - b) + 1".  */
   b--;
 
-#define DS __asm__ ("dstep %2,%0" : "=r" (a) : "0" (a), "r" (b))
+#define DS __asm__ ("dstep %2,%0" : "=r" (a) : "0" (a), "r" (b)); \
+ __attribute__ ((__fallthrough__))
 
   switch (quot_digits)
     {