I\'m trying to instrument some code to catch and print error messages. Currently I\'m using a macro somethng like this:
#define my_function(x) \\ switch(functi
GCC has a feature called statement expressions
So if define macro like
#define FOO(A) ({int retval; retval = do_something(A); retval;})
then you will be able to use it like
foo = FOO(bar);