I'm writing some complex macros that needs to be able to tell if the argument is a constant declared with a #define.
I was using the function:
__builtin_constant_p() but that also returns true if the argument is a constant variable.
const x = 0; #define x 0
__builtin_constant_p() will return true for either of these declarations.
Is there a way to tell if an argument is a real constant declared with a #define vs just a constant variable?
I want to have this happen during pre-processing so that I can use the argument as part of another macro that does concatenation.