I am trying to use the offsetof macro within another macro of my own, as follows:
#define MY_MACRO(struct_type, member) \
my_function(param1, offsetof(struct_type, member))
When I use my custom macro, the compiler complains that 'member' has not been declared. Is there a special way to parse structure member names into macros maybe?
I am using Microchip's XC32 compiler.