fork(1) download
  1. #include <stdio.h>
  2.  
  3. #ifdef DEBUG
  4. #define CHECK(expr) foo(expr)
  5. #else
  6. #define CHECK(expr)
  7. #endif /* DEBUG */
  8.  
  9. int bar (int x, int y, int z)
  10. {
  11. //do nothing
  12. return 0;
  13. }
  14.  
  15. int main(void)
  16. {
  17. int a= 0, b = 0, c = 0;
  18. int x = bar(a, b, c); /* bar has to be called for both DEBUG begin defined and undefined */
  19. CHECK(x);
  20. printf("Hello, world!\n");
  21. return 0;
  22. }
  23.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function 'main':
prog.c:18:9: error: unused variable 'x' [-Werror=unused-variable]
     int x = bar(a, b, c); /* bar has to be called for both DEBUG begin defined and undefined */ 
         ^
cc1: all warnings being treated as errors
stdout
Standard output is empty