[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 26 10:58:37 PDT 2025
AaronBallman wrote:
> Although C++ might have good alternatives, that's not so helpful for C headers being included from C++ that might end up using this (e.g. some static inline function in a system header). (i.e. if it's not too much effort to do, I would encourage exposing it in C++)
We can contrive reasons to expose this in C++, and it would be a conforming extension there, but I'm still not convinced that's a good idea. Historically, many of the things we expose from C into C++ have some really rough edges we mostly ignore, like VLAs, _Complex vs std::complex, etc and I'd like to break that cycle by not exposing everything to both languages just because we can. I'm not strongly opposed in this case, but I'd still rather wait for a real world use case beyond "it could be used there" before we expose it to C++.
https://github.com/llvm/llvm-project/pull/133125
More information about the cfe-commits
mailing list