Forum : ST7/STM8
Original Post
Post Information | Post |
---|---|
September 14, 2009 - 12:28pm
|
I'm getting this error:
For the following code: extern volatile unsigned char TestVar; int main(void) { unsigned char a, b, c, d, e, f; if ((a == 0) && ( b | TestVar | c | e | e | f)) { a = TestVar; } } The error goes away if TestVar is not declared as volatile. I'm using the latest IDE & ST7 Toolkit (just downloaded them). Target is ST72361AR6. |
The error is fixed and tests are running.
Stéphane
If I understand correctly, this will be fixed in the next release? In the meantime, is there any way to work around this?
Blasio,
The only workaround is to remove the volatile attribute. You can also use a temporary variable for the test. Temporary variable previously initialized with TestVar, but is like removing the volatile attribute!
Stéphane
PS: I'll send you a patch as soon as all tests pass.