astitcher commented on code in PR #408:
URL: https://github.com/apache/qpid-proton/pull/408#discussion_r1365514732


##########
c/include/proton/annotations.h:
##########
@@ -90,4 +90,24 @@
     #endif
 #endif
 
+// fallthrough
+#if defined __cplusplus && defined __has_cpp_attribute
+    #if __has_cpp_attribute(fallthrough) && __cplusplus >= 
__has_cpp_attribute(fallthrough)
+        #define PN_FALLTHROUGH [[fallthrough]]
+    #endif
+#endif
+#if !defined PN_FALLTHROUGH && defined __STDC_VERSION__ && defined 
__has_c_attribute
+    #if __has_c_attribute(fallthrough) && __STDC_VERSION__ >= 
__has_c_attribute(fallthrough)
+        #define PN_FALLTHROUGH [[fallthrough]]
+    #endif
+#endif
+#if !defined PN_FALLTHROUGH && defined __has_attribute

Review Comment:
   again could be `#elif`



##########
c/include/proton/annotations.h:
##########
@@ -90,4 +90,24 @@
     #endif
 #endif
 
+// fallthrough
+#if defined __cplusplus && defined __has_cpp_attribute
+    #if __has_cpp_attribute(fallthrough) && __cplusplus >= 
__has_cpp_attribute(fallthrough)
+        #define PN_FALLTHROUGH [[fallthrough]]
+    #endif
+#endif
+#if !defined PN_FALLTHROUGH && defined __STDC_VERSION__ && defined 
__has_c_attribute
+    #if __has_c_attribute(fallthrough) && __STDC_VERSION__ >= 
__has_c_attribute(fallthrough)
+        #define PN_FALLTHROUGH [[fallthrough]]
+    #endif
+#endif
+#if !defined PN_FALLTHROUGH && defined __has_attribute
+    #if __has_attribute(__fallthrough__)
+        #define PN_FALLTHROUGH __attribute__((__fallthrough__))
+    #endif
+#endif
+#if !defined PN_FALLTHROUGH

Review Comment:
   this could be `#else`



##########
c/include/proton/annotations.h:
##########
@@ -90,4 +90,24 @@
     #endif
 #endif
 
+// fallthrough
+#if defined __cplusplus && defined __has_cpp_attribute
+    #if __has_cpp_attribute(fallthrough) && __cplusplus >= 
__has_cpp_attribute(fallthrough)
+        #define PN_FALLTHROUGH [[fallthrough]]
+    #endif
+#endif
+#if !defined PN_FALLTHROUGH && defined __STDC_VERSION__ && defined 
__has_c_attribute
+    #if __has_c_attribute(fallthrough) && __STDC_VERSION__ >= 
__has_c_attribute(fallthrough)
+        #define PN_FALLTHROUGH [[fallthrough]]
+    #endif
+#endif
+#if !defined PN_FALLTHROUGH && defined __has_attribute
+    #if __has_attribute(__fallthrough__)
+        #define PN_FALLTHROUGH __attribute__((__fallthrough__))
+    #endif
+#endif
+#if !defined PN_FALLTHROUGH
+    #define PN_FALLTHROUGH (void)0

Review Comment:
   Although does this actually tell a linter that there is an expected 
fallthrough? - That is what the `//Fallthru` comments are for, but I don't 
think you can preprocess into comments.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to