Conversation
|
Been a while since I've seen GCC ICE |
| typedef AlertType Type; | ||
| using enum AlertType; |
There was a problem hiding this comment.
It seems that using enum is not understood by MinGW and the baremetal job:
build/include/botan/tls_alert.h:75:13: error: expected nested-name-specifier before ‘enum’
75 | using enum AlertType;
| ^~~~
Why not stay with the current construction of having a plain enum nested inside class Alert? Isn't that the same "smart-enum" idiom we used in other places?
There was a problem hiding this comment.
Also, my gut feeling is that this is why GCC is ICE-ing. Which it still does, by the way.
For instance in the GCC sanitizer job:
/home/runner/work/botan/botan/build/build/include/botan/asio_stream.h:628:47: internal compiler error: in tsubst_copy, at cp/pt.c:16822
628 | if(alert.type() == TLS::Alert::CloseNotify)
| ~~~~~~~~~~~~^~~~~~~~~~~
[...]
There was a problem hiding this comment.
Why not stay with the current construction of having a plain enum nested inside class Alert? Isn't that the same "smart-enum" idiom we used in other places?
It is, but that's only because I just found out about using enum in C++20. If it works I plan to modify at least some of the other enumerations similarly. Having the enumeration being an enum class prevents certain errors, for example adding two enumerations is valid for plain enum but invalid for enum class.
There was a problem hiding this comment.
It seems that using enum is not understood by MinGW and the baremetal job:
It appears both of these are actually GCC 10!
There was a problem hiding this comment.
Which it still does, by the way.
I missed the case in asio that triggers the ICE
782b02c to
f5c4a87
Compare
Codecov ReportBase: 88.10% // Head: 88.10% // Increases project coverage by
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## master #3246 +/- ##
=======================================
Coverage 88.10% 88.10%
=======================================
Files 609 609
Lines 68257 68263 +6
Branches 6804 6808 +4
=======================================
+ Hits 60136 60145 +9
Misses 5278 5278
+ Partials 2843 2840 -3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
f5c4a87 to
021cfb4
Compare
|
Merged the wrong commit - this has landed |
A handful of alert types that it seemed likely applications would special case on (like close notify and protocol version problems) have the old names retained as deprecated variants. For the rest only the new name is available.