-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
C++20 compatibility: a lot of warnings #8916
Comments
C++20, probably not before also switching to GCC12 or latter afaik there is a paper about de-deprecation of these operations Notably, gcc already implements it in master version (12, 13 include it already?) Also, https://docs.platformio.org/en/latest/projectconf/sections/env/options/build/build_src_flags.html and https://docs.platformio.org/en/latest/scripting/index.html should limit build flag to just your project files (unless our headers somehow interfere) |
Well, I was confused at first, but C++20 is working with the current setup (GCC 10.3.0), but it's experimental.
https://community.platformio.org/t/std-gnu-20-is-shown-as-201709-nodemcuarduino/32514/3
I've tried it and I still still get the warnings. Actually, yeah – I wish I could somehow "separate" flags for my and external code… |
I have temporarily disabled all |
Feel free to provide a PR :) Volatile use in I2C master seems to originate from old SDK behaviour where OS (aka ETS) timers were serviced as soon as the peripheral timer expired. This is no longer the case, timers are handled in a task instead. So, I would guess it might be pretty safe to just remove volatile code in those sections. I2C slave code is using pin ISR, so some sync logic still needs to happen somewhere. Which libraries other than I2C are affected? |
Ok, will try – I was asking about that at the beginning: 2. Are you open for PRs in this matter? :-) Mostly because after playing with C++/uC/Arduino/ESP8266/PIO for a year already, I can see that a lot of the projects are… kinda abandonware… Even simple issues/PRs get not answered/merged for many months… Hence asking if I'm gonna waste my time, trying to do anything – hopefully not!
Oooof, my C++ brain is too small for that, yet. I might try simple substitution from the "short" |
Basic Infos
Platform
Settings in IDE
Problem Description
I've set a flag to compile with the latest (available) standard:
-std=gnu++20
.It works, but it produces a lot of warnings, for example:
They are all connected to the fact that starting with C++20, some of the
volatile
operations are deprecated: https://blog.feabhas.com/2021/05/modern-embedded-c-deprecation-of-volatile/The text was updated successfully, but these errors were encountered: