-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PROTON-2773: add PN_FALLTHROUGH
macro ready for c++17/c21
#408
PROTON-2773: add PN_FALLTHROUGH
macro ready for c++17/c21
#408
Conversation
c205cb4
to
452e250
Compare
The original motivation for this is to be able to have composite CMake build with skupper-router. With skupper-router adding proton as cmake subproject. To do this, both projects need to compile with the same flags, and skupper-router defines |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically lgtm.
My comments are basically stylistic, just my preference for if...else if.. chains in this case.
#endif | ||
#if !defined PN_FALLTHROUGH && defined __has_attribute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again could be #elif
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, because we might be on older c that has a __has_c_attribute but not the [[fallthrough]];, so we would go into
#if !defined PN_FALLTHROUGH && defined __STDC_VERSION__ && defined __has_c_attribute
but not define PN_FALLTHROUGH there
#endif | ||
#if !defined PN_FALLTHROUGH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could be #else
2da6f6e
to
68b01f3
Compare
Thanks for looking into this. I changed it to #if#elif where it was straightforward to do. |
No description provided.