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

IAR: ALIGNED not supported warning in the header file might result in lot of warnings #152

Closed
0xc0170 opened this issue Feb 16, 2017 · 4 comments
Labels

Comments

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 16, 2017

The warning is fine to warn a user that something is not supported by a compiler but the placement of this warning might be counterproductive - in a header file. It's currently in a header that is being included everywhere as it's part of CMSIS. Therefore when a user compiles their code, it might end up with 100x warnings (all are the same, for each file that depends on CMSIS). It creates lot of noise, that will result in removing this warning after few compilations :-)

Here's the warning:
[Pe1105]: #warning directive: No compiler specific solution for __ALIGNED. __ALIGNED is ignored.

I would suggest to have one code file that would warn about this - warning: this feature of cmsis is not supported by this compiler. Or remove that warning and document it what is supported and what not (a user should be aware some extensions are not supported - they are compiler specific. - thus a code using it might not be portable.

@ReinhardKeil
Copy link
Collaborator

I think you should be able to use a compiler directive that effectively inserts an #define __ALIGNED. In this way you can avoid the issue.

P.S. IAR is working on a solution to that problem.

@0xc0170
Copy link
Contributor Author

0xc0170 commented Feb 28, 2017

I am missing how this was resolved (DONE label) ? The warning was removed? IAR new version needed or?

@JonatanAntoni
Copy link
Member

IAR seems to have solved the issue. With EW-ARM 7.80.4 IAR ships a cmsis_iar.h header file containing the required macro definition as

#ifndef __ALIGNED
#define __ALIGNED(x) __attribute__((aligned(x)))
#endif

@0xc0170
Copy link
Contributor Author

0xc0170 commented Mar 2, 2017

I'll close this issue, thanks!

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

No branches or pull requests

3 participants