2017-05-07 17:35:49 +00:00
|
|
|
/*
|
|
|
|
!!DESCRIPTION!! char-sized post-increment and -decrement
|
|
|
|
!!ORIGIN!! cc65 regression tests
|
|
|
|
!!LICENCE!! Public Domain
|
|
|
|
!!AUTHOR!! Lauri Kasanen
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
static unsigned char val, array[2];
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
|
2019-02-12 21:50:49 +00:00
|
|
|
val = 0;
|
|
|
|
array[0] = array[1] = 10;
|
2017-05-07 17:35:49 +00:00
|
|
|
|
2019-02-12 21:50:49 +00:00
|
|
|
array[val++] = 2;
|
|
|
|
array[val++] = 2;
|
|
|
|
--val;
|
|
|
|
array[val--] = 0;
|
|
|
|
array[val--] = 0;
|
2017-05-07 17:35:49 +00:00
|
|
|
|
2019-02-12 21:50:49 +00:00
|
|
|
return (array[0] == array[1] && array[0] == 0 && val == 0xff) ? 0 : 1;
|
2017-05-07 17:35:49 +00:00
|
|
|
}
|