[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)
Justin Stitt via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 22 11:42:36 PDT 2024
JustinStitt wrote:
> I’m a little concerned about not allowing the attribute in C++ - the existence of other options in C++ does not mean they are an option (due to various and sundry restrictions of C++ version upgrades different projects have), but also you trivially end up in cases where header code is correct/safe in C, but undefined when included in C++.
>
> To me that seems like a significant footgun.
Yes, great point. The attribute should support C++ fairly well right now but the frontend doesn't allow it to be enabled because I am not certain how the magics of the c++ type/attribute system will interact with it. I figured a good starting point is to get the attribute working with C.
other comment in thread about avoiding issues by disabling c++ support: https://github.com/llvm/llvm-project/pull/86618#issuecomment-2050356907
https://github.com/llvm/llvm-project/pull/86618
More information about the cfe-commits
mailing list