In the following code, the code generator recognizes that the
structure fields s.a
and s.b
are
constants.
If any structure field is assigned
inside a control construct, the code generator does not recognize
the constant fields. This limitation also applies to arrays with constant
elements. Consider the following code:
The code generator does not recognize that s.a
and s.b
are
constant. If variable-sizing is enabled, y
is treated
as a variable-size array. If variable-sizing is disabled, the code
generator reports an error.