Skip to content
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

[Warning] stm32f4xx_ll_adc.h@1844,3: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register] #10717

Closed
teetak01 opened this issue May 31, 2019 · 8 comments · Fixed by #10740

Comments

@teetak01
Copy link
Contributor

teetak01 commented May 31, 2019

Description

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]

Issue request type

[ ] Question
[ ] Enhancement
[X] Bug
@0xc0170
Copy link
Contributor

0xc0170 commented May 31, 2019

@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 ?

@chrissnow
Copy link
Contributor

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!

@ciarmcom
Copy link
Member

Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-1247

@kjbracey
Copy link
Contributor

kjbracey commented Jun 3, 2019

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.

@kjbracey
Copy link
Contributor

kjbracey commented Jun 3, 2019

Made a fix to shut the compiler up for now: #10740

@jeromecoutant
Copy link
Collaborator

ST_INTERNAL_REF 67609

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 3, 2019

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

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 3, 2019

OK to be closed once 10740 is in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants