You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

bof.ptrarith.limit.c 362 B

3 years ago
123456789101112131415161718192021222324
  1. void f() {
  2. int buf[10];
  3. int *limit = buf + 10;
  4. int *p = buf;
  5. while (p < limit)
  6. *p++ = 0;
  7. }
  8. void f2() {
  9. int buf[10];
  10. int *limit = buf + 11;
  11. int *p = buf;
  12. while (p < limit)
  13. *p++ = 0; //#1bug-5#
  14. }
  15. void f3() {
  16. int buf[10];
  17. int *limit = buf;
  18. int *p = buf + 9;
  19. while (p >= limit)
  20. *p-- = 0;
  21. }

No Description

Contributors (1)