[previous] 0641 [next] [C] '%s' in 'struct' or 'union' type may not have function type.
Constraint violations REFERENCE - ISO:C90-6.5.2.1 Structure and Union Specifiers - Constraints

This is a constraint error

This struct or union member has been declared with "function" type; perhaps "pointer to function" was intended?

For example:


/*PRQA S 553,2213,2216 ++*/

struct ST1 { int mode; int f(void);};        /* Message 0641 - f has function type */

struct ST2 { int mode; int (*f)(void);};     /* OK           - f has type pointer to function */

See also:

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