![]() |
![]() |
0782 | ![]() |
||||
![]() | |||||||
| Identifiers | REFERENCE - ISO:C90-6.1.2.3 Name Spaces of Identifiers | ||||||
The same identifier can refer to more than one entity providing the entities are declared in different scopes or different namespaces. Messages 0780 and 0782 are generated when the same identifier is declared in different namespaces within the same scope. Message 0782 is generated on the first declaration and message 0780 on the second. There are 2 exceptions to this rule relating specifically to members of structs and unions.
/*PRQA S 553,750,1310,2017,2213,2216,3205,3210,3447 ++*/
extern int A; /* Message 0782 + 1577 */
struct A {int a1; int a2;}; /* Message 0780 + 1582 */
typedef struct B {int b1; int b2;} B; /* Message 0782 + 1577 and 0780 + 1582 */
extern int C; /* Message 0783 + 1577 */
struct c1 {int C; int c2;}; /* Message 0781 + 1582 */
union d1 {int D; int d2;}; /* Message 0783 + 1577 */
typedef int D; /* Message 0781 + 1582 */
typedef struct e1 {int E; int e2;} E; /* Message 0783 + 1577 and 0781 + 1582 */
struct f1 {int F; int f2;}; /* */
struct f3 {int F; int f4;}; /* */
See also:
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |