[PATCH] D131465: C++/ObjC++: switch to gnu++17 as the default standard

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 21 12:32:00 PDT 2022


MaskRay added a comment.

In D131465#3804893 <https://reviews.llvm.org/D131465#3804893>, @glandium wrote:

> This didn't change the default for msvc targets, was that expected?

I think it is expected (but I did not know when I made the change)

https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus?view=msvc-170 says the default is `/std:c++14`.
If I use `/Zc:__cplusplus` on godbolt.org, I get `__cplusplus => 201402`. I think clang-cl likely wants to follow MSVC.
The relevant code is around https://github.com/llvm/llvm-project/blob/669e508772e5e00db6285d699ee82a428dc00f32/clang/lib/Driver/ToolChains/Clang.cpp#L6628


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