fork download
  1. void test_switch(int i) {
  2. static int state;
  3.  
  4. if (i == 0)
  5. state = 0;
  6. else if (i == 1 && some_condition)
  7. some_function();
  8. else
  9. other_function();
  10. }
  11.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function 'test_switch':
prog.c:6:21: error: 'some_condition' undeclared (first use in this function)
  else if (i == 1 && some_condition)
                     ^
prog.c:6:21: note: each undeclared identifier is reported only once for each function it appears in
prog.c:7:5: warning: implicit declaration of function 'some_function' [-Wimplicit-function-declaration]
     some_function();
     ^
prog.c:9:6: warning: implicit declaration of function 'other_function' [-Wimplicit-function-declaration]
      other_function();
      ^
prog.c:2:13: warning: variable 'state' set but not used [-Wunused-but-set-variable]
  static int state;
             ^
stdout
Standard output is empty