diff options
author | Bruno Haible <bruno@clisp.org> | 2018-07-26 02:00:39 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2018-07-26 02:00:39 +0200 |
commit | 0d37a8763d9a5169ee2cb71a0281f859ca159b87 (patch) | |
tree | db4dfdfef3b646d9cbfd719f0640d9a9136773ba /tests/objc.exp | |
parent | 13c9383b10872525688ef2b4daab090037ea3576 (diff) | |
download | gperf-0d37a8763d9a5169ee2cb71a0281f859ca159b87.tar.gz |
Avoid "implicit fallthrough" warnings in the generated code.
Diffstat (limited to 'tests/objc.exp')
-rw-r--r-- | tests/objc.exp | 5 |
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: |