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=gnu++2a causes cpp standard to be set to c++2 in c_cpp_properties.json #3653

Closed
1 task done
maciekr1234 opened this issue Sep 5, 2020 · 2 comments
Closed
1 task done
Assignees
Milestone

Comments

@maciekr1234
Copy link

What kind of issue is this?

  • PlatformIO Core.
    If you’ve found a bug, please provide an information below.

Configuration

Operating system: Windows 10

PlatformIO Version (platformio --version): PlatformIO, version 5.0.0

Description of problem

When I set standard to gnu++2a in GCC compiler pio doesn't match a which causes cpp extension to not set the correct standard.

c_cpp_properties_error

I actually managed to track the issue and successfully fix the issue.

% STD_RE = re.compile(r"\-std=[a-z\+]+(\d+)")

% STD_RE = re.compile(r"\-std=[a-z\+]+([\da]+)")

"cppStandard": "c++{{ cxx_stds[-1].replace('2a','20') }}",

This seems to solve the issue in cpp_config and keeps the compiler happy.
c_cpp_properties_error_2

@valeros
Copy link
Member

valeros commented Sep 9, 2020

Hi @maciekr1234 ! Thanks for reporting. It should be fixed in the development branch. Please upgrade to the latest revision via running pio upgrade --dev command in the IDE terminal and try again. Thanks!

@maciekr1234
Copy link
Author

@valeros works great. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants