1*c85f09ccSJohn Levon extern void func(void); 2*c85f09ccSJohn Levon global_function(void)3*c85f09ccSJohn Levonint global_function(void) 4*c85f09ccSJohn Levon { 5*c85f09ccSJohn Levon if (func) 6*c85f09ccSJohn Levon return 1; 7*c85f09ccSJohn Levon return 0; 8*c85f09ccSJohn Levon } 9*c85f09ccSJohn Levon 10*c85f09ccSJohn Levon /* 11*c85f09ccSJohn Levon * check-name: Waddress-function 12*c85f09ccSJohn Levon * check-command: sparse -Wno-decl -Waddress $file 13*c85f09ccSJohn Levon * 14*c85f09ccSJohn Levon * check-error-start 15*c85f09ccSJohn Levon Waddress-function.c:5:13: warning: the address of a function will always evaluate as true 16*c85f09ccSJohn Levon * check-error-end 17*c85f09ccSJohn Levon */ 18