libstatic.c 304 B

123456789101112131415
  1. #include <stdio.h>
  2. static int global_static = -1;
  3. int static_test(void)
  4. {
  5. static int local_static = -2;
  6. if (global_static != -1)
  7. printf("FAIL: global_static is not -1\n");
  8. if (local_static != -2)
  9. printf("FAIL: local_static is not -2\n");
  10. return (global_static == -1 && local_static == -2);
  11. }