[previous] 0667 [next] [U] '%s' is declared as a typedef and may not be redeclared as an object at an inner scope without an explicit type specifier.
Explicitly undefined REFERENCE - ISO:C90-6.5.6 Type Definitions - Semantics

An identifier which has been declared as a typedef, is being redeclared at an inner scope without using an explicit type specifier. This is not permitted.

For example:


/*PRQA S 1329,2017,2051,2211,3204,3205,3220,3221,3227,3408,3447,3602 ++*/

typedef int X;

extern void foo(int n)
{
    const int X = 0;   /* Message 3334 - X is redeclared with a type specifier */

    if (n > 0)
    {
        const X;       /* Message 0667 and 3334 - X is redeclared without a type specifier */
    }
}

See also:

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