2014-09-24 14:45:10 +00:00
|
|
|
/*
|
2022-04-17 14:07:52 +00:00
|
|
|
!!DESCRIPTION!!
|
2014-09-24 14:45:10 +00:00
|
|
|
!!ORIGIN!! testsuite
|
|
|
|
!!LICENCE!! Public Domain
|
|
|
|
!!AUTHOR!!
|
|
|
|
*/
|
|
|
|
|
2014-11-22 17:28:05 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2014-09-24 14:45:10 +00:00
|
|
|
/*
|
2022-04-17 14:07:52 +00:00
|
|
|
there is a bug in the preprocessor (i think) ... the following works
|
2014-09-24 14:45:10 +00:00
|
|
|
(compiles) correctly:
|
|
|
|
|
|
|
|
unsigned long fs,fd,a;
|
|
|
|
|
|
|
|
unsigned long _func(unsigned long x,unsigned long y)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
fs=(_func((fd/a),(_func(2,0x0082c90f))));
|
|
|
|
}
|
|
|
|
|
|
|
|
now if i wrap _func into a macro like this:
|
|
|
|
|
|
|
|
#define func(x,y) _func(x,y)
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
fs=(func((fd/a),(func(2,0x0082c90f))));
|
|
|
|
}
|
|
|
|
|
2022-04-17 14:07:52 +00:00
|
|
|
i get "Error: ')' expected" on that line. (this is with the snapshot, freshly
|
2014-09-24 14:45:10 +00:00
|
|
|
compiled 5 minutes ago)
|
|
|
|
*/
|
|
|
|
|
|
|
|
unsigned long fs,fd,a;
|
|
|
|
|
|
|
|
unsigned long _func1(unsigned long x,unsigned long y)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int test1(void)
|
|
|
|
{
|
|
|
|
fs=(_func1((fd/a),(_func1(2,0x0082c90f))));
|
|
|
|
}
|
|
|
|
|
|
|
|
#define func(x,y) _func1(x,y)
|
|
|
|
|
|
|
|
int test2(void)
|
|
|
|
{
|
|
|
|
fs=(func((fd/a),(func(2,0x0082c90f))));
|
|
|
|
}
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
printf("it works :)\n");
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|