summaryrefslogtreecommitdiff
path: root/tests/modula2.exp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/modula2.exp')
-rw-r--r--tests/modula2.exp35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/modula2.exp b/tests/modula2.exp
index 02001b7..658223b 100644
--- a/tests/modula2.exp
+++ b/tests/modula2.exp
@@ -81,24 +81,59 @@ hash (register const char *str, register size_t len)
{
default:
hval += asso_values[(unsigned char)str[7]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 7:
hval += asso_values[(unsigned char)str[6]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 6:
hval += asso_values[(unsigned char)str[5]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 5:
hval += asso_values[(unsigned char)str[4]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 4:
hval += asso_values[(unsigned char)str[3]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 3:
hval += asso_values[(unsigned char)str[2]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 2:
hval += asso_values[(unsigned char)str[1]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 1:
hval += asso_values[(unsigned char)str[0]];