[clang] Add flag to suppress overflow errors in C++ constant expressions. (PR #102390)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 9 07:48:37 PDT 2024
AaronBallman wrote:
> I think a default-error, sfinae-failing diagnostic should be pretty safe; everyone will get the correct diagnostics by default, and some narrow subset of people can disable them if they cause issues.
Clang community stance has consistently been that we have no interest in supporting `-fpermissive` or code that only compiles with that flag. While some folks have reasons to stay on older NDKs, the [NDK documentation](https://developer.android.com/ndk/downloads) implies that anything but the latest is unsupported. This change isn't in a released NDK, but the beta for a release with this fix comes out [this month](https://github.com/android/ndk/wiki) so there is a plausible solution for folks by the time Clang 19 ships.
I don't see anyone arguing that this is a good language extension to C++ for Clang to carry, so because this mostly impacts people who are stuck on an older NDK (which suggests that they'll be just as stuck on an older NDK next year or the year after, etc), I'm concerned we'll have to carry this language extension forever. So while I can see a case either way, my preference (personal, not code owner) is to *not* turn this into a warning that defaults to an error. But maybe I'm misunderstanding the situation, too.
https://github.com/llvm/llvm-project/pull/102390
More information about the cfe-commits
mailing list