Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
I've been getting a LOT of erroneous C4017W warnings after adding a new field to a struct in one of my projects. I researched it, and found out it's a data flow analysis warning related to hardware register use. Adding an extra field made my struct exactly 4B, which in turn made it a prime candidate for the compiler to store in a register. In other words, the compiler is optimizing my struct, and then complaining about its own optimizations...
I propose that the online compiler should suppress this warning since all it does is generate "noise", potentially hiding other legitimate warnings. Apparently the ARM Compiler 5.04 and later suppress it by default, so even ARM knows it's garbage.