raspberrypi / pico-sdk

BSD 3-Clause "New" or "Revised" License
3.8k stars 953 forks source link

C++20 volatile warnings #1343

Open GFoxPM opened 1 year ago

GFoxPM commented 1 year ago

Lots of warnings: compound assignment with 'volatile'-qualified left operand is deprecated [-Wvolatile] Fixes like: /src/rp2_common/cmsis/stub/CMSIS/Core/Include/mpu_armv7.h#L210

-  MPU->CTRL  &= ~MPU_CTRL_ENABLE_Msk;
+  MPU->CTRL  = MPU->CTRL & ~MPU_CTRL_ENABLE_Msk;
kilograham commented 4 months ago

@will-v-pi is this fixed with latest CMSIS headers?

will-v-pi commented 4 months ago

No, although I think it's being looked into - see https://github.com/ARM-software/CMSIS_5/issues/1544 and https://github.com/ARM-software/CMSIS_6/issues/121

These CMSIS stubs are taken directly from the upstream CMSIS repo, so we won't be modifying them in this repo. Once they're fixed there we'll update our headers here