Synopsis: | The initialiser for a struct, union or array bound, must be enclosed in braces. |
Language: | C |
Severity Level: | 2 |
Category: | DECLARATIONS |
Description: |
The ANSI standard does not define the behaviour of implementations when confronted with initialiser lists which are not brace enclosed.
Example: typedef struct coord { int x; } Coord; ... Coord origin = 0; /* undefined behaviour*/ Example: typedef struct coord { int x; } Coord; ... Coord mpoint = {0}; /* legal */ |