[clang] Add flag to suppress overflow errors in C++ constant expressions. (PR #102390)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 8 04:56:33 PDT 2024


AaronBallman wrote:

CC @zygoloid @hubert-reinterpretcast @cor3ntin @shafik for more opinions regarding diagnostic behavior

> Not sure if this is really worth doing if it only affects the Android NDK; Android trunk has been fixed. And presumably most people will use the compiler from the NDK itself, so they'll update their headers before they ever run into this. But posting so we can discuss...

The NDK code is ill-formed per https://eel.is/c++draft/expr.shift#1.sentence-4 and the fix is already applied from looking at https://android.googlesource.com/platform/frameworks/native/+/master/libs/nativewindow/include/android/hardware_buffer.h#329

I've not spotted any issues opened against 19.x rc1 or rc2 regarding this (let alone something suggesting it's breaking a system header), so unless we get feedback very quickly, I don't see a compelling reason to let this be downgraded to a warning.

https://github.com/llvm/llvm-project/pull/102390


More information about the cfe-commits mailing list