[previous] 0320 [next] [C99] Declaration within 'for' statement.
ISO C99 Language features REFERENCE - ISO:C99-6.8.5 Iteration statements

An object has been defined within a for statement. This syntax is a feature of ISO:C99 but is not supported in ISO:C90.

For example:


/*PRQA S 2017,3120,3408 ++*/

extern void foo(void)
{
    for (int i = 0; i < 10; ++i)           /* Message 0320 and also 3220 */
    {

    }
}

See also:

QA·C Source Code Analyser 8.1.2
© 2013 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index Contents