In C Programming, If a pre processor directive is not defined it is ignored as un defined. The below code doesn't print, since PRINT_DEFINED macro is not defined, is there a way to get it flagged during compilation time to avoid any potential miss of the feature.
# include <stdio.h>
int main (void)
{
#if PRINT_DEFINED
printf("I am printing the statement\n");
#endif
return 0;
}
The problem with using #ifdef and #error is I have a large code base and where if any wrong macro is entered assuming that is defined it will be skipped in compilation which is undesired.