C language compares whether two macros are equivalent

I want to judge that if a macro is defined as X, do action A, and when defined as Y, do action B. It"s okay to write like this

-sharpdefine X ((void*)0)
-sharpdefine M X
-sharpif M==X
    -sharperror("Equal!");
-sharpelse
    -sharperror("Not equal");
-sharpendif

is there any way to make it work, or to achieve this function in disguise?

CPP c
Jul.04,2022
Menu