fork(1) download
  1. #include <stdio.h>
  2.  
  3. #define RETURN_SUCCESS() {return 0;}
  4. #define RETURN_FAILURE() {return 1;}
  5.  
  6. int func(void)
  7. {
  8. if (0)
  9. RETURN_SUCCESS();
  10. else
  11. RETURN_FAILURE();
  12. }
  13.  
  14. int main() {
  15. printf("%d\n", func());
  16. }
Compilation error #stdin compilation error #stdout 0s 2248KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘func’:
prog.c:10:5: error: ‘else’ without a previous ‘if’
     else
     ^
prog.c: In function ‘main’:
prog.c:16:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
stdout
Standard output is empty