ARMC6 compiler warnings with stm32f4xx_ll_adc.h with Mbed OS 5.13.0-RC1
Tested with ublox_evk_odin_w2 target using mbed-cloud-client-example. Seems to appear with other ST-targets.
[Warning] stm32f4xx_ll_adc.h@4242,3: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
[Warning] stm32f4xx_ll_rtc.h@1213,3: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
[Warning] stm32f4xx_ll_usart.h@1062,3: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
[ ] Question
[ ] Enhancement
[X] Bug
@ARMmbed/team-st-mcd You already reported this in the PR updating the compilers. This is known warning for newer C++1x standards.
@kjbracey-arm Understanding this should be fixed but if the latest C++1x bump for 5.13 caused so many warnings, shouldn't we mask this register at least for now and create an issue for each component causing the warnings to clean them up? My suggestion would be for 5.13 - for newer C++1x standard define register as empty for only components that need it (so we won't pollute other spaces).
Different suggestions ?
It actually slows the compiler down a fair bit too as it has to print all the warnings, nearly 8000 of them on the F429!
Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-1247
We can add the warning suppression to the build profiles: -Wno-deprecated-register
Seems like a reasonable thing to do for now, if there's a lot of them in the target code.
Not sure of the best way to track the clean-up; one big issue or multiple sub-issues or both. That's a low-priority task though, I guess. Not anticipating a C++17 upgrade soon.
Made a fix to shut the compiler up for now: #10740
ST_INTERNAL_REF 67609
ST_INTERNAL_REF 67609
@jeromecoutant We are reviewing 10740. Once all green, will go into the release which would mean this could be closed. Do you want to keep this tracked (opened) to fix register usage in ST driver code or rather create new issue for the clean-up
OK to be closed once 10740 is in