-
Notifications
You must be signed in to change notification settings - Fork 375
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 volatile warnings #1379
Comments
The second change will optimize the loop away completeley, so its intended function of providing a delay is destroyed. |
Hm, using Other alternatives generated different microcode, so it would change the timing. Not sure if it's enough to break BOOTSEL functionality. |
For the 2nd one I think the following is the safest:
That said, this is something that wouldn't be looked at until the move from GCC-10 to GCC-12, whenever it comes around. Also, per @maxgerhardt 's linked issue the C++ guys seem to have dropped this as a warning going forward so maybe by then it will be a non-issue. |
#pragma GCC diagnostic ignored "-Wvolatile" Is there more information about the lack of warnings in GCC12? Doesn't generate a warning: - for (volatile int i = 0; i < 1000; ++i);
+ volatile int i = 1000;
+ while(i) { i = i - 1; } |
@GFoxPM are you using |
@earlephilhower Yes, I'm currently using |
Per esp8266/Arduino#8916 (comment) it seems these |
Lots of warnings: compound assignment with 'volatile'-qualified left operand is deprecated [-Wvolatile]
Fixes like:
/cores/rp2040/RP2040Support.h#L361
/cores/rp2040/Bootsel.cpp#L38
/cores/rp2040/SerialPIO.cpp#L237
The text was updated successfully, but these errors were encountered: