-
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
FATFS / IAR compilation issue Pe029 #11259
Conversation
@JanneKiiskila, thank you for your changes. |
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.
I'm not actually sure why IAR is rejecting this. Seems like it should be legal to me (after 20 minutes of staring at cppreference).
But it's crummy code anyway, and the memset
is worse.
Instead, please get rid of the assignment in the body, and just add _fs()
to the member initialiser list. That will clear it out nicely.
BTW, which version of IAR are you using, and why isn't this showing up in some CI? |
It's 2019 now.
IAR compilation fails at `_fs = { 0 };` due to ``` [Error] FATFileSystem.cpp@285,0: [Pe029]: expected an expression ``` Changing that object initializer list instead, as that seems to pass IAR compilation, too. Changed original memset to object initialiser list based on review feedback from Kevin Bracey.
84cf24f
to
f149b4c
Compare
This is actually showing up on Client CI, hence the PR. Rebased, force pushed and changed the memset to initializer list implementation as per your feedback (very valid one). |
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.
Really should have been caught in Mbed OS pull CI before it hit master.
Fully agree on that. |
Seems different IAR versions behave differently here, IAR 8.32 seems to compile even w/o this fix, but an older one - fails. |
CI started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Then I reckon it was a now-fixed compiler bug. The code seemed valid. |
IAR / FATFS - Pe029 error
IAR compilation fails at
_fs = { 0 };
due toChanging that initializer fixes the issue. IAR is more sensitive
in C/C++ being mixed together than other compilers.
Reviewers
@0xc0170 @kjbracey-arm @michalpasztamobica