11f5207bJohn Levonint
21f5207bJohn Levonfoo (int (*func) (undef, void *), void *data)
31f5207bJohn Levon{
41f5207bJohn Levon  int err = 0;
51f5207bJohn Levon  while (cur) {
61f5207bJohn Levon    if ((*func) (cur, data))
71f5207bJohn Levon      break;
81f5207bJohn Levon  }
91f5207bJohn Levon  return err;
101f5207bJohn Levon}
111f5207bJohn Levon
121f5207bJohn Levon/*
131f5207bJohn Levon * check-name: missing type in argument list
141f5207bJohn Levon * check-error-start
151f5207bJohn Levonbadtype3.c:2:18: warning: identifier list not in definition
161f5207bJohn Levonbadtype3.c:2:24: error: Expected ) in function declarator
171f5207bJohn Levonbadtype3.c:2:24: error: got ,
181f5207bJohn Levonbadtype3.c:5:3: error: Trying to use reserved word 'while' as identifier
191f5207bJohn Levonbadtype3.c:7:7: error: break/continue not in iterator scope
201f5207bJohn Levonbadtype3.c:9:3: error: Trying to use reserved word 'return' as identifier
211f5207bJohn Levonbadtype3.c:9:10: error: Expected ; at end of declaration
221f5207bJohn Levonbadtype3.c:9:10: error: got err
231f5207bJohn Levonbadtype3.c:10:1: error: Expected ; at the end of type declaration
241f5207bJohn Levonbadtype3.c:10:1: error: got }
251f5207bJohn Levonbadtype3.c:6:11: error: undefined identifier 'func'
261f5207bJohn Levon * check-error-end
271f5207bJohn Levon */
28