1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-23 19:29:37 +00:00
cc65/test/ref/macro.c
2019-02-12 22:50:49 +01:00

31 lines
589 B
C

/*
!!DESCRIPTION!! macro bug test program
!!ORIGIN!! testsuite
!!LICENCE!! Public Domain
!!AUTHOR!! Groepaz/Hitmen
*/
#include <stdio.h>
#include <stdlib.h>
unsigned long fs=7;
unsigned long fd=5;
unsigned long a=3;
unsigned long _func(unsigned long x,unsigned long y)
{
printf("x:%ld y:%ld\n",x,y);
return 0;
}
#define func(x,y) _func(x,y)
int main(void)
{
fs= func( (fd/a) , func(2,0x0082c90f) );
printf("fs:%ld\n",fs);
fs=_func( (fd/a) , _func(2,0x0082c90f) );
printf("fs:%ld\n",fs);
return 0;
}