This issue is related to the fact that there are differences in the configuration parameters between top and referenced models.
Please note that this error occurs if there are differences in the 'Standard math library' parameter in Configuration Parameters > Code Generation > Interface > Advanced parameters.
For instance, this parameter could be C89/C90 (ANSI) for the parent model and a child model, and C99 (ISO) for another child model.
In order to solve this issue, please make sure to use the same Configuration parameters. Configuration references can help avoid parameter mismatches: