MATLAB: Do I receive Polyspace compiler errors even though the code looks acceptable

Polyspace Bug Finder

Why do I receive Polyspace compiler errors even though my code looks acceptable?

Best Answer

Be careful about your Polyspace Preprocessor Definitions. You are able to emulate various compiler behavior by adding or even subtracting macros from the preprocessor.
For example, consider the following line of code. It defines a bitfield member called "MT".
volatile unsigned int MT:1
If one of your Polyspace preprocessor definitions is "MT=0", Polyspace will see the following code when it attempts to compile.
volatile unsigned int 0:1
This will cause a syntax error because the line of code no longer makes sense.