summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/c-parse.exp5
-rw-r--r--tests/charsets.exp55
-rw-r--r--tests/chill.exp145
-rw-r--r--tests/cplusplus.exp10
-rw-r--r--tests/java.exp5
-rw-r--r--tests/languages.exp15
-rw-r--r--tests/modula2.exp35
-rw-r--r--tests/objc.exp5
8 files changed, 275 insertions, 0 deletions
diff --git a/tests/c-parse.exp b/tests/c-parse.exp
index 3b46a35..d88878c 100644
--- a/tests/c-parse.exp
+++ b/tests/c-parse.exp
@@ -86,6 +86,11 @@ hash (str, len)
{
default:
hval += asso_values[(unsigned char)str[2]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 2:
case 1:
diff --git a/tests/charsets.exp b/tests/charsets.exp
index 2be2ddf..4af888f 100644
--- a/tests/charsets.exp
+++ b/tests/charsets.exp
@@ -93,6 +93,11 @@ hash (register const char *str, register size_t len)
{
default:
hval += asso_values[(unsigned char)str[21]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 21:
case 20:
@@ -106,33 +111,83 @@ hash (register const char *str, register size_t len)
case 12:
case 11:
hval += asso_values[(unsigned char)str[10]+1];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 10:
hval += asso_values[(unsigned char)str[9]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 9:
hval += asso_values[(unsigned char)str[8]+1];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 8:
hval += asso_values[(unsigned char)str[7]+3];
+#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]+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]];
diff --git a/tests/chill.exp b/tests/chill.exp
index faf4bd7..3fc858a 100644
--- a/tests/chill.exp
+++ b/tests/chill.exp
@@ -84,90 +84,235 @@ hash (str, len)
{
default:
hval += asso_values[(unsigned char)str[29]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 29:
hval += asso_values[(unsigned char)str[28]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 28:
hval += asso_values[(unsigned char)str[27]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 27:
hval += asso_values[(unsigned char)str[26]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 26:
hval += asso_values[(unsigned char)str[25]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 25:
hval += asso_values[(unsigned char)str[24]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 24:
hval += asso_values[(unsigned char)str[23]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 23:
hval += asso_values[(unsigned char)str[22]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 22:
hval += asso_values[(unsigned char)str[21]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 21:
hval += asso_values[(unsigned char)str[20]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 20:
hval += asso_values[(unsigned char)str[19]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 19:
hval += asso_values[(unsigned char)str[18]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 18:
hval += asso_values[(unsigned char)str[17]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 17:
hval += asso_values[(unsigned char)str[16]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 16:
hval += asso_values[(unsigned char)str[15]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 15:
hval += asso_values[(unsigned char)str[14]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 14:
hval += asso_values[(unsigned char)str[13]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 13:
hval += asso_values[(unsigned char)str[12]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 12:
hval += asso_values[(unsigned char)str[11]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 11:
hval += asso_values[(unsigned char)str[10]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 10:
hval += asso_values[(unsigned char)str[9]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 9:
hval += asso_values[(unsigned char)str[8]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 8:
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]+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]];
diff --git a/tests/cplusplus.exp b/tests/cplusplus.exp
index 148ad96..20c4471 100644
--- a/tests/cplusplus.exp
+++ b/tests/cplusplus.exp
@@ -86,11 +86,21 @@ hash (str, len)
{
default:
hval += asso_values[(unsigned char)str[6]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 6:
case 5:
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:
case 2:
diff --git a/tests/java.exp b/tests/java.exp
index 44fa7ff..7176106 100644
--- a/tests/java.exp
+++ b/tests/java.exp
@@ -110,6 +110,11 @@ hash (str, len)
{
default:
hval += asso_values[(unsigned char)str[2]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 2:
case 1:
diff --git a/tests/languages.exp b/tests/languages.exp
index 2de2500..36d36d7 100644
--- a/tests/languages.exp
+++ b/tests/languages.exp
@@ -97,13 +97,28 @@ hash (register const char *str, register size_t len)
{
default:
hval += asso_values[(unsigned char)str[4]+1];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 4:
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]+9];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 1:
hval += asso_values[(unsigned char)str[0]];
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]];
diff --git a/tests/objc.exp b/tests/objc.exp
index 2c3374b..379e668 100644
--- a/tests/objc.exp
+++ b/tests/objc.exp
@@ -84,6 +84,11 @@ hash (register const char *str, register size_t len)
{
default:
hval += asso_values[(unsigned char)str[2]];
+#if defined __cplusplus && __cplusplus >= 201703L
+ [[fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+ __attribute__ ((__fallthrough__));
+#endif
/*FALLTHROUGH*/
case 2:
case 1: