summaryrefslogtreecommitdiff
path: root/tests/objc.exp
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2018-07-26 02:00:39 +0200
committerBruno Haible <bruno@clisp.org>2018-07-26 02:00:39 +0200
commit0d37a8763d9a5169ee2cb71a0281f859ca159b87 (patch)
treedb4dfdfef3b646d9cbfd719f0640d9a9136773ba /tests/objc.exp
parent13c9383b10872525688ef2b4daab090037ea3576 (diff)
downloadgperf-0d37a8763d9a5169ee2cb71a0281f859ca159b87.tar.gz
Avoid "implicit fallthrough" warnings in the generated code.
Diffstat (limited to 'tests/objc.exp')
-rw-r--r--tests/objc.exp5
1 files changed, 5 insertions, 0 deletions
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: