[previous] 0655 [next] [C] Illegal storage class specifier on unnamed function parameter.
Constraint violations REFERENCE - ISO:C90-6.5.4.3 Function Declarators - Constraints, ISO:C90-6.7.1 Function Definitions - Constraints

This is a constraint error

A storage-class specifier other than 'register' has been applied to an unnamed parameter in a function declaration. Parameters are local objects, initialised on entry to the function at each call. They are automatic but the 'auto' storage class specifier may not be used.

For example:


/*PRQA S 553,2213,1335,2711,3206,3210,3408 ++*/

void f1(typedef  int );       /* Message 0655 */
void f2(extern   int );       /* Message 0655 */
void f3(static   int );       /* Message 0655 */
void f4(auto     int );       /* Message 0655 */
void f5(register int );       /* OK */

void fa(typedef  int x);      /* Message 0650 */
void fb(extern   int x);      /* Message 0650 */
void fc(static   int x);      /* Message 0650 */
void fd(auto     int x);      /* Message 0650 */
void fe(register int x);      /* OK */

See also:

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