-
Notifications
You must be signed in to change notification settings - Fork 574
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
Set minimum supported version of Clang to 17 #4528
base: master
Are you sure you want to change the base?
Conversation
caa293f
to
3ca1c65
Compare
3ca1c65
to
3113b24
Compare
3113b24
to
353dc8d
Compare
Clang didn't implement WG21 P0634R3 until Clang 16
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.
All for it, but what about semver guarantees?
// TODO: C++20 introduces std::source_location which will allow to eliminate this | ||
// macro altogether. Instead, using code would just call the C++ function | ||
// that makes use of std::source_location like so: | ||
// | ||
// template<typename T, uint32_t M, typename F> | ||
// int botan_ffi_visit(botan_struct<T, M>* obj, F func, | ||
// const std::source_location sl = std::source_location::current()) | ||
// { | ||
// // [...] | ||
// if constexpr(...) | ||
// { | ||
// return ffi_guard_thunk(sl.function_name(), [&] { return func(*p); }) | ||
// } | ||
// // [...] | ||
// } | ||
#define BOTAN_FFI_VISIT(obj, lambda) botan_ffi_visit(obj, lambda, __func__) |
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.
🥳
Personally I view SemVer and the minimum supported compiler version as distinct issues. Admittedly this is not spelled out so concretely, only alluded to in statements in the docs like
In retrospect specifying the minimum Clang version in 3.0.0 rather than floating it like XCode/NDK was a mistake, since it was known at the time that Clang was well behind on C++20 features. Alas. I can't find many comparable situations wrt required toolchain updates. C is pretty stagnant so it doesn't come up much. In Rust you just bump the minor version. Apps like Chrome do this (I guess they just recently started requiring Clang 16) but it's not quite the same situation as for a library that has direct downstream consumers. For context main motivation here is that with a bit of work we can capture the location of all exception throws with Maybe not worth it though. |
That's exactly my concern.
I believe
Newer compiler is always worth it, in my personal opinion. Though, I feel we did upset some users with the jump to C++20 (most notable the automobile industry that is bound to MISRA, and thus C++17). |
#4529