Take the 2-minute tour ×

I have a bunch of generated functions from a supplier's tool are required to be defined by me. Since the inner functionality of each and every one of these functions are exactly the same, I figured I could use a macro to make my life easier.

Here is the offending warning:

pasting "<function_name>" and "(" does not give a valid preprocessing token

Now, I define my macro as follows:

#define HANDLE_FUNCTION(x)               \
  void <function_prefix>_ ## x ## (void) \
  {                                      \
    x ## _Flag = TRUE;                   \

In my code I then write:


...and so on

Any thoughts on why this occurs?

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

Remove the second ##, it has no use (you don't want to make one symbol of function_name().

share|improve this answer
of course...thanks! –  espais Mar 3 '10 at 13:49
add comment

Your Answer


