[previous] 1054 [next] [C99] A compound literal has been used.
ISO C99 Language features REFERENCE - ISO:C99-6.5.2.5 Compound literals

A 'compound literal' has been used. This syntax is not supported in ISO:C90, but it IS allowed in ISO:C99.

For example:


/*PRQA S 2017,2213,2216,3120,3121,3408,3447,3604,3617 ++*/

struct ST { int im; float fm; };

extern struct ST stx;

void foo(void)
{
    stx = (struct ST) {45, 1.23F};              /* Message 1054 */
}


MISRA C:2012 Rules applicable to message 1054:

Dir-1.1  (Required) Any implementation-defined behaviour on which the output of the program depends shall be documented and understood


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