[previous] 0653 [next] [C] Duplicate definition of 'struct', 'union' or 'enum' tag '%s'.
Constraint violations REFERENCE - ISO:C90-6.5 Declarations - Constraints, ISO:C90-6.5.2.3 Tags

This is a constraint error

This tag has already been declared within the same scope. Multiple declarations of a tag within the same scope are not allowed.

For example:


/*PRQA S 553,722,750,2211,2213,2216,3210,3447,3602 ++*/

struct T1 { int a; int b; };
struct T1 { int a; int b; };           /* Message 0547 and also 0653 */

struct T2 { int a; int b; };
struct T2 { int a; long b;};           /* Message 0547 and also 0653 */

struct T3 { int a; int b; };
union  T3 { int a; int b; };           /* Message 0547               */

union  T4 { int a; int b; };
enum   T4 { A = 5, B, C   };           /* Message 0547               */

See also:

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