[PATCH] D150450: Add C++26 compile flags.

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 15 08:07:49 PDT 2023


erichkeane marked 8 inline comments as done.
erichkeane added inline comments.


================
Comment at: clang/docs/CommandGuide/clang.rst:206-210
+   Working draft for ISO C++ 2026
+
+  | ``gnu++2c``
+
+   Working draft for ISO C++ 2026 with GNU extensions
----------------
aaron.ballman wrote:
> We shouldn't call it `ISO C++ 2026` until it's published by ISO. (I don't have strong opinions about 2c vs 26 in there, but since we need to update it anyway when 26 is released, I figured it'd be easier to find again with 2c.)
Ah, I just copied from what we had for C++23 before the flip.  But this makes sense, I chose `2c` for the reason you mentioned.


================
Comment at: clang/lib/Frontend/InitPreprocessor.cpp:456
+      // FIXME: Use correct value for C++26.
+      Builder.defineMacro("__cplusplus", "202402L");
+    else if (LangOpts.CPlusPlus23)
----------------
aaron.ballman wrote:
> This value is fine by me, but we should probably coordinate with the GCC folks so we don't wind up with two different values between us.
Email sent to GCC maintainer (aaron copied!).


================
Comment at: clang/www/cxx_status.html:1568
 
+<h2 id="cxx26">C++2c implementation status</h2>
+
----------------
aaron.ballman wrote:
> cor3ntin wrote:
> > h-vetinari wrote:
> > > The longer this page gets, the more I feel it should be sorted in reverse chronological order of the standard versions. It's bothersome IMO to keep scrolling past almost-fully implemented standards (currently the tables for C++17 & C++20) before getting to see the status of the latest & greatest. 
> > > 
> > > https://en.cppreference.com/w/cpp/compiler_support is sorted in reverse order as well.
> > This sounds like an excellent improvement.
> > Erich, would you rather do that in this pr, or i can submit a different patch afterwards?
> I love the idea, and I think it should be done in a separate patch.
Corentin: you're welcome to do it in a different patch, but I like the idea as well!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150450/new/

https://reviews.llvm.org/D150450



More information about the cfe-commits mailing list