cling = new cling::Interpreter(argc, argv, LLVMDIR);
cling->process(“#define NUM_A 2”);
cling->process(“#define NUM_A 4”);
Outputs:
input_line_4:1:9: warning: ‘NUM_A’ macro redefined [-Wmacro-redefined]
#define NUM_A 4
^
input_line_3:1:9: note: previous definition is here
#define NUM_A 2
^
How would I go about enabling that flag “-Wmacro-redefined” so I don’t have to see these warnings in the code?
From what I’ve read on the forums, this didn’t work:
argc = 1;
const char *const woption = “-Wmacro-redefined”;
argv = &woption;
and i’ve tried setting the environment variable before executing the compiled binary
export EXTRA_CLING_ARGS=‘-Wmacro-redefined’
Is it possible?
or can I turn off all warnings emitted?