-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Avoid init class definition for compatibility #14603
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- ARM: no more warning
- IAR: compilation is OK
Thx!
@paul-szczepanek-arm, thank you for your changes. |
It's worth noting that these bitfields are a bad idea in terms of code size. I've stripped a lot of similar ones on a customer branch. You're not gaining enough (or anything) in RAM to justify the ROM increase. By inspection, I don't think this particular case saves RAM at all over just 2 bools. I'd reserve bitfields for classes where you really do have a significant number of instances of the class, and a significant number of bits. (And ironically bitfields are the least ROM efficient on the most constrained systems - ARMv6-M and ARMv8-M baseline don't have the specialised bitfield access instructions, so they particularly bloat code on an M0). |
CI s tarted |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Summary of changes
Avoid compatibility problems by not initialising the member variable in class definition. As reported here:
#14511
Impact of changes
Migration actions required
Documentation
none
Pull request type
Test results
Reviewers