![]() |
![]() |
3635 | ![]() |
||||
![]() | |||||||
| Functions | REFERENCE - ISO:C90-6.2,2,1 Lvalues and Function Designators | ||||||
This function name is not followed by parentheses and so, rather than being a function call, it is interpreted as an expression of pointer type. If this is the intended behaviour, it might be better to precede the function name with an "&" operator. This will not affect the meaning of the expression but it will make it explicit that the function name is not intended to generate a function call. Message 3635 is generated whenever the name of a function is used without either a preceding & or following parentheses. For example:
/*PRQA S 2017,2213,3132,3218,3227,3344,3408,3447,3602 ++*/
extern int f1( int x );
extern int f2( int x );
extern int f3( int x );
static int (* const ap1[3])(int x) =
{
&f1,
&f2,
f3 /* Message 3635 */
};
extern void test(int n)
{
if ( f1 ) { } /* Message 3635 and 0428 */
if ( f1 != ap1[ n ] ) { } /* Message 3635 */
}
See also:
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |