MATLAB: Do I receive an error message when generating code for an EML block which has a structure field name as OVERFLOW in in Simulink 7.2(R2008b)

emlmacrooverflowsimulink coderunderflow

I tried to generate code for a simple EML block using Simulink 7.2(2008b). The EML block contains the following line:
Cmd_Status.OVERFLOW = 16;
y=u;
I expected the model including the EML block to compile, run and the output to match the constant input of 1. However, I receive the following error message:
Error EML_bug_sfun.c: .\c2_EML_bug.h: 14 syntax error; found `3' expecting `;'
Error EML_bug_sfun.c: .\c2_EML_bug.h: 14 skipping `3'

Best Answer

This is an expected behaviour because there is a clash between the field name and an existing MACRO. The keyword OVERFLOW is already defined in math.h which is included while building the EML block.
As a workaround, use a different name(OVERFLOW1) or lowercase name (overflow) for the structure field.