I want to redefine a macro, without modifying the header or source files.
For example: #define macro_1 Present -- Is what actually defined in the header file
For one set of execution I need this macro to be same as it is , but for another set of execution I need the macro to be redefined to value 'Absent' This should be done without changing the header file. Am using the ghs compliler.
I tried undef option but its not effectively working
For GCC or Clang, the option to define a macro on the command line is
-D. As in-D macro_1=\"Absent\".You need to use conditional-compilation in the header file though:
Otherwise you will get macro redefinition errors.