[previous] 0620 [next] [C] Cannot initialize '%s' because it has unknown size.
Constraint violations REFERENCE - ISO:C90-6.5.7 Initialization - Constraints

This is a constraint error

This is a tentative definition. The object has to be implicitly initialized (to zero) but it can't be, because the struct/union is of incomplete type, i.e. its members and therefore its size have not been defined.

For example:


/*PRQA S 679,2213,3211,3313,3408 ++*/

struct ST1 ast;          /* Message 0620 - if ST1 is not defined */


MISRA C:2012 Rules applicable to message 0620:

Rule-1.1  (Required) The program shall contain no violations of the standard C syntax and constraints, and shall not exceed the implementation's translation limits


See also:

QA·C Source Code Analyser 8.1
MISRA C:2012 Compliance Module 1.0
© 2012 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index Contents