[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

Yuanfang Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 3 23:10:10 PDT 2022


ychen added a comment.

In D128745#3832432 <https://reviews.llvm.org/D128745#3832432>, @rjmccall wrote:

> Pinging this thread because it has more reviewers who probably have opinions about this.
>
> https://reviews.llvm.org/D134507 is a patch that adds `-fclang-abi-compat` support around the breaking change here, which basically means that targets using old `-fclang-abi-compat` settings never get this change.  I've argued on that patch that that isn't the right way of resolving this issue.  Basically, the DR here is changing the language behavior in a way that you can imagine having ABI impact, but it's not primarily an ABI change, it's a language semantics change.  The ABI impact is purely that we potentially select a different overload in some cases, which can have downstream ODR impact.  I think the appropriate way to handle language semantics changes like this which potentially have compatibility impact is to condition them on language version.  Changing the target language standard is already broadly understood to have source/semantic compatibility impact, which is why we allow different target language standards to be specified in the first place.  This also makes it straightforward to document this potential break as a consequence of moving to `-std=c++23`, and it removes a potential rather bizarre portability issue where platforms that embrace stable ABIs are permanently stuck with a language dialect.

This is very reasonable to me except that I hope, for this particular patch, to key on `-std=c++20` instead of `-std=c++23` since this is needed for P2113 <https://reviews.llvm.org/P2113>, a C++20 change.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128745



More information about the cfe-commits mailing list