[PATCH 3 16/16] MIPS: Fix fallthrough warning for mips16e
Jovan Dmitrovic
jovan.dmitrovic@htecgroup.com
Thu Feb 5 16:24:24 GMT 2026
In 28c06ff1a1, some fallthough warnings were fixed, but not all of
them. Notably, this causes a build-time error when Werror is
enabled.
* sim/mips/m16e.igen: Added ATTRIBUTE_FALLTROUGH where needed.
---
sim/mips/m16e.igen | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sim/mips/m16e.igen b/sim/mips/m16e.igen
index 0db8f6b392f..64ae93a5689 100644
--- a/sim/mips/m16e.igen
+++ b/sim/mips/m16e.igen
@@ -305,16 +305,22 @@
switch (xsregs) {
case 7:
GPR[30] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
+ ATTRIBUTE_FALLTHROUGH;
case 6:
GPR[23] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
+ ATTRIBUTE_FALLTHROUGH;
case 5:
GPR[22] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
+ ATTRIBUTE_FALLTHROUGH;
case 4:
GPR[21] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
+ ATTRIBUTE_FALLTHROUGH;
case 3:
GPR[20] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
+ ATTRIBUTE_FALLTHROUGH;
case 2:
GPR[19] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
+ ATTRIBUTE_FALLTHROUGH;
case 1:
GPR[18] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
}
--
2.34.1
More information about the Binutils
mailing list