As you can see concatenating a token works,
also a token being another macro works,
but when a token is a macro it doesn't seem to work?
longNameForaFunction_one(){return 1;}
longNameForaFunction_two(){return 2;}
longNameForaFunction_third(){return 3;}
two(){return 2;}
#define bar two
#define foo(x)(longNameForaFunction_##x())
#define three third
main(){
printf("%d\n",foo(one)); // 1
printf("%d\n",foo(two)); // 2
printf("%d\n",bar()); // 2
// printf("%d\n",foo(three)); // this doesn't work
}
The last row gives this error if uncommented;
undefined reference to `longNameForaFunction_three'
#define three third
Seems to have no effect