mirror of
https://github.com/cc65/cc65.git
synced 2024-11-16 18:08:04 +00:00
24 lines
419 B
C
24 lines
419 B
C
/*
|
|
!!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() {
|
|
|
|
val = 0;
|
|
array[0] = array[1] = 10;
|
|
|
|
array[val++] = 2;
|
|
array[val++] = 2;
|
|
--val;
|
|
array[val--] = 0;
|
|
array[val--] = 0;
|
|
|
|
return (array[0] == array[1] && array[0] == 0 && val == 0xff) ? 0 : 1;
|
|
}
|