[PATCH] D131465: C++/ObjC++: switch to gnu++17 as the default standard
Mike Hommey via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 23 13:51:21 PDT 2022
glandium added a comment.
In D131465#3812424 <https://reviews.llvm.org/D131465#3812424>, @rnk wrote:
> I think both driver share the logic for MSVC version detection, which checks for cl.exe on PATH and looks at the registry if that fails.
>
> I think we should try to lean towards making this policy easy to document and communicate to users, and that means our rules need to be concise. I worry that different defaults will surprise cross-platform projects ("hey, my code built with on clang Linux, but not Windows with clang-cl, why is that, let's debug..."). A simple rule like "clang 16.0 raised the default C++ standard version to 17, except on PS4" seems preferable.
If it's based on installed MSVC version, there's even the risk of "clang-cl on windows doesn't behave the same whether MSVC is installed or not" or "clang-cl on windows doesn't behave the same when MSVC is not registered in the registry (e.g. a zip unpack)" or "clang-cl on Linux (cross-compile) doesn't behave the same as clang-cl on windows". None of which are desirable.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131465/new/
https://reviews.llvm.org/D131465
More information about the cfe-commits
mailing list