summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2019-03-16 01:37:23 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2019-03-16 01:37:23 -0400
commit97d4c11ba6e0edb4bf2b3722ab236bb0c5f9eb3a (patch)
tree42452f138e1e8a513c04ca59a5e0d0d324dad494
parent1f7afa9c700c8bb93c833a0024f9505be7763c4d (diff)
downloadlighttpd1.4-97d4c11ba6e0edb4bf2b3722ab236bb0c5f9eb3a.zip
lighttpd1.4-97d4c11ba6e0edb4bf2b3722ab236bb0c5f9eb3a.tar.gz
[core] __attribute__((fallthrough)) for GCC 7.0
-rw-r--r--src/first.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/first.h b/src/first.h
index 2b0018a..044d7e1 100644
--- a/src/first.h
+++ b/src/first.h
@@ -111,5 +111,12 @@
#endif
#endif
+#if __has_attribute(fallthrough) \
+ || __GNUC_PREREQ(7,0)
+#define __attribute_fallthrough__ __attribute__((__fallthrough__));
+#else
+#define __attribute_fallthrough__
+#endif
+
#endif