Caution
The Issues are strictly limited for the reporting of problem encountered with the software provided in this project.
For any other problem related to the STM32 product, the performance, the hardware characteristics and boards, the tools the environment in general, please post a topic in the ST Community/STM32 MCUs forum
Describe the set-up
Custom board using STM32C011F6Px
GNU Tools for STM32 (13.3.rel1) — arm-none-eabi-g++ with -std=gnu++17
Describe the bug
Eight uses of the register storage class specifier remain in the LL driver headers. The register keyword is deprecated in C++11 and removed in C++17; any project compiled with -std=c++17 or -std=gnu++17 receives a warning (treated as an error with -Werror):
Affected locations:
Drivers/STM32C0xx_HAL_Driver/Inc/stm32c0xx_ll_adc.h
line 4010, 4115, 4120
Drivers/STM32C0xx_HAL_Driver/Inc/stm32c0xx_ll_rtc.h
line 1077, 1105, 1410, 1438, 1741
How To Reproduce
Create any C++ project targeting STM32C0 that includes stm32c0xx_ll_adc.h or stm32c0xx_ll_rtc.h and calls the affected LL functions.
Compile with -std=c++17 (or -std=gnu++17).
The compiler emits [-Wregister] warnings for each of the eight lines listed above.
Additional context
The fix is straightforward — remove the register keyword from the eight variable declarations. The qualifier has had no effect on code generation in modern compilers for many years.
Caution
The Issues are strictly limited for the reporting of problem encountered with the software provided in this project.
For any other problem related to the STM32 product, the performance, the hardware characteristics and boards, the tools the environment in general, please post a topic in the ST Community/STM32 MCUs forum
Describe the set-up
Custom board using STM32C011F6Px
GNU Tools for STM32 (13.3.rel1) — arm-none-eabi-g++ with -std=gnu++17
Describe the bug
Eight uses of the register storage class specifier remain in the LL driver headers. The register keyword is deprecated in C++11 and removed in C++17; any project compiled with -std=c++17 or -std=gnu++17 receives a warning (treated as an error with -Werror):
Affected locations:
Drivers/STM32C0xx_HAL_Driver/Inc/stm32c0xx_ll_adc.h
line 4010, 4115, 4120
Drivers/STM32C0xx_HAL_Driver/Inc/stm32c0xx_ll_rtc.h
line 1077, 1105, 1410, 1438, 1741
How To Reproduce
Create any C++ project targeting STM32C0 that includes stm32c0xx_ll_adc.h or stm32c0xx_ll_rtc.h and calls the affected LL functions.
Compile with -std=c++17 (or -std=gnu++17).
The compiler emits [-Wregister] warnings for each of the eight lines listed above.
Additional context
The fix is straightforward — remove the register keyword from the eight variable declarations. The qualifier has had no effect on code generation in modern compilers for many years.