I have a construct similar to below which compiles fine if including the header file in the C file, but if the same file is included as header file in CPP, ac2000.exe gets into segmentation fault (refer to the snapshot)
I am using C2000 18.12.3 LTS Compiler, tried the same with the latest C2000 compiler as well. Still the segmentation fault occurs.
#define functionmacro(datatype, value1)
({
datatype return_value;
if (value1 = 1)
{
return_value = value1;
}
else if (value1 = 2)
{
return_value = value1+2;
}
else
{
return_value = value1 - 2;
}
return_value;
})
