[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 27 04:49:46 PDT 2025


================
@@ -141,6 +141,12 @@ C2y Feature Support
   paper also introduced octal and hexadecimal delimited escape sequences (e.g.,
   ``"\x{12}\o{12}"``) which are also supported as an extension in older C
   language modes.
+- Implemented `WG14 N3369 <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3369.pdf>`_
+  which introduces the ``_Lengthof`` operator, and `WG14 N3469 <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3469.htm>`_
+  which renamed ``_Lengthof`` to ``_Countof``. This feature is implemented as
+  a conforming extension in earlier C language modes, but not in C++ language
+  modes (``std::extent`` and ``std::rank`` already provide the same
----------------
AaronBallman wrote:

Fair point!

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


More information about the cfe-commits mailing list