Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-std=c++11 is not required on MSVC #44

Closed
dtolnay opened this issue Feb 25, 2020 · 0 comments · Fixed by #194
Closed

-std=c++11 is not required on MSVC #44

dtolnay opened this issue Feb 25, 2020 · 0 comments · Fixed by #194
Labels
help wanted warning windows Issues that manifest on Windows

Comments

@dtolnay
Copy link
Owner

dtolnay commented Feb 25, 2020

Building on x86_64-pc-windows-msvc currently emits this warning:

warning: cl : Command line warning D9002 : ignoring unknown option '-std=c++11'

According to https://docs.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version?view=vs-2019, C++11 is the default with flags /std:c++14 and /std:c++17 for the newer standards.

We should find a way to pass -std=c++11 only when it's required, such as on x86_64-apple-darwin where C++98 is the default. https://opensource.apple.com/source/clang/clang-800.0.42.1/src/tools/clang/www/cxx_status.html

running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-Wall" "-Wextra" "-o" "/Users/travis/build/dtolnay/cxx/target/debug/build/cxx-f198c1b742072022/out/src/cxxbridge.o" "-c" "src/cxxbridge.cc"

In file included from src/cxxbridge.cc:1:
src/../include/cxxbridge.h:9:18: warning: 'final' keyword is a C++11 extension [-Wc++11-extensions]
class RustString final {
                 ^
@dtolnay dtolnay mentioned this issue Feb 25, 2020
@dtolnay dtolnay added the windows Issues that manifest on Windows label Aug 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted warning windows Issues that manifest on Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant