[JIRA] (SSPCPP-945) log4shib: dynamic exception specifications are forbidden by ISO C++17
Ferenc Wágner (Jira)
jira at shibboleth.atlassian.net
Wed Oct 13 13:56:21 UTC 2021
Ferenc Wágner ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=6111238d6051c5006a368065 ) *created* an issue
Shibboleth SP - C++ ( https://shibboleth.atlassian.net/browse/SSPCPP?atlOrigin=eyJpIjoiYWU4NGYwNDM3MDE1NGJlNDkxZmJjN2JkODE1MTBhNjciLCJwIjoiaiJ9 ) / Improvement ( https://shibboleth.atlassian.net/browse/SSPCPP-945?atlOrigin=eyJpIjoiYWU4NGYwNDM3MDE1NGJlNDkxZmJjN2JkODE1MTBhNjciLCJwIjoiaiJ9 ) SSPCPP-945 ( https://shibboleth.atlassian.net/browse/SSPCPP-945?atlOrigin=eyJpIjoiYWU4NGYwNDM3MDE1NGJlNDkxZmJjN2JkODE1MTBhNjciLCJwIjoiaiJ9 ) log4shib: dynamic exception specifications are forbidden by ISO C++17 ( https://shibboleth.atlassian.net/browse/SSPCPP-945?atlOrigin=eyJpIjoiYWU4NGYwNDM3MDE1NGJlNDkxZmJjN2JkODE1MTBhNjciLCJwIjoiaiJ9 )
Issue Type: Improvement Assignee: Scott Cantor ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A5b78efc9-1379-42cc-a3f6-56c6ea3a0007 ) Components: Logging Created: 13/Oct/21 9:56 AM Environment:
GCC 11 (Debian unstable)
Priority: Trivial Reporter: Ferenc Wágner ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=6111238d6051c5006a368065 )
The original report is https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=984222. GCC 11 defaults to the C++17 standard, which does not tolerate the log4shib code, for example:
../include/log4shib/Priority.hh:106:9: error: ISO C++17 does not allow dynamic exception specifications
106 | throw(std::invalid_argument);
| ^~~~~
In the log4shib_2.0.0-3 Debian package I replaced all such specifications with noexcept(false) , see https://salsa.debian.org/shib-team/log4shib/-/commits/cpp17/ for the patch (the two old commits are unrelated to the C++17 issue, they just align behavior with the other projects of the stack).
You may prefer to just drop the exception specifications ( noexcept was introduced in C++11 AFAIK), I left them in for better visibility only, and I'm willing to create the other variant if you wish. However, I did this rather mechanically without giving any deeper thought (if it compiles it must be right, right?), so don't neglect to review (my C++ is weak).
( https://shibboleth.atlassian.net/browse/SSPCPP-945#add-comment?atlOrigin=eyJpIjoiYWU4NGYwNDM3MDE1NGJlNDkxZmJjN2JkODE1MTBhNjciLCJwIjoiaiJ9 ) Add Comment ( https://shibboleth.atlassian.net/browse/SSPCPP-945#add-comment?atlOrigin=eyJpIjoiYWU4NGYwNDM3MDE1NGJlNDkxZmJjN2JkODE1MTBhNjciLCJwIjoiaiJ9 )
Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100181- sha1:4b5d772 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/commits/attachments/20211013/eec5a634/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-comment-icon-bfe5e04e-c0c0-4696-9962-fe29d49142b6
Type: image/png
Size: 1084 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20211013/eec5a634/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-avatar-ed8c96e6-f553-4bba-b699-259522e49113
Type: image/png
Size: 457 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20211013/eec5a634/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-trivial-978bb974-d0d2-477d-80bf-9122422249b2
Type: image/png
Size: 563 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20211013/eec5a634/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-footer-desktop-logo-1d4aea96-8b5a-4959-bb9e-55a65c0a4257
Type: image/png
Size: 10805 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20211013/eec5a634/attachment-0007.png>
More information about the commits
mailing list