[previous] 1100 [next] The label '%s' is also declared as a typedef.
Identifiers REFERENCE - ISO:C90-6.1.2.3 Name Spaces of Identifiers

The identifier used to define this label has been used previously within the current scope to declare a typedef.

Label identifiers occupy a name space which is distinct from all other identifiers and so a label only needs to be unique within a single function. However reusing the same identifier for different purposes within the same function like this is always going to be unhelpful for readability.

Message 1100 actually duplicates some of the functionality of message 0780. However message 0780 is much more comprehensive and identifies all situations where an identifier is reused in a different namespace.

For example:


/*PRQA S 2015,2201,2211,2213,2216,3120,3198,3202,3203,3205,3408,3447,3602 ++*/

extern int n;

extern void foo(void)
{
    typedef int a;                           /* 0782 1577                */
    int b;                                   /* 0782 1577                */
    struct c {int m1; int m2;};              /* 0782 1577                */

a:  n = 0;                                   /* 0780 1582 1100           */

b:  n = 1;                                   /* 0780 1582                */

c:  n = 2;                                   /* 0780 1582                */
}

See also:

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