[ 
https://issues.apache.org/jira/browse/PROTON-2773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17777273#comment-17777273
 ] 

ASF GitHub Bot commented on PROTON-2773:
----------------------------------------

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


##########
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

Review Comment:
   For this c/c++ check, yes, this is exclusive, but I can't replace all the 
#endif #if with #elif here.
   
   I changed this one line.





> [c] Add various compiler diagnostic helper macros
> -------------------------------------------------
>
>                 Key: PROTON-2773
>                 URL: https://issues.apache.org/jira/browse/PROTON-2773
>             Project: Qpid Proton
>          Issue Type: Improvement
>          Components: proton-c
>    Affects Versions: proton-c-0.39.0
>            Reporter: Jiri Daněk
>            Assignee: Jiri Daněk
>            Priority: Major
>             Fix For: proton-c-0.40.0
>
>
> This includes the printf format string verification from PROTON-2772, 
> fallthrough annotations, and macros for compiler diagnostic handling pragmas.
> If any other improvements are thought of, they can be merged as part of this, 
> or new issue can be created if a Proton release happens in the meantime.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to