I added one line to a function and now I get an error C3201
Here is the code. I added the last line in this list
/* ************************************************************ */
void simulate_stick(unsigned char arrow_state) {
setLedArrow5(arrow_state && 0x01);
arrow_state = arrow_state / 2; // throws a C3201 error
...
/* ************************************************************ */
void simulate_stick(unsigned char arrow_state) {
Now, I am editing all code inside of the CodeWarrior IDE.
I don't have UNIX - this is a Windows 7 PC.
Where did that error come from?
What can I do to eliminate the error?
Hello
I would try the following:
CrasyCat
Apparently, if I compile three times in sequence without making any changes to the code, the error goes away.
However, it comes back as soon as I change the code and try to re-compile. Then I have to repeat two more times to get the error to go away.
This is definitly a bug in the IDE.
How should it be reported?
Alright, I have the root cause.
I must have leaned on the shift key when I pressed return at the end of that line, then I added the ;
<shift><return> adds a <cr> character without the <lf> character. It is called a soft return in the printing industry.
Running make a couple of times in a row must have temporarily removed the lone <cr> and placed a <cr><lf> at the end of the line.
So, it is still a bug which should be prevented, or you could change the documentation to show this possibility.