gcc/testsuite/c-c++-common/analyzer/attr-alloc_size-3.c
raw| 1 | typedef long int idx_t; |
| 2 | extern void rpl_free (void *ptr); |
| 3 | |
| 4 | void *xicalloc (idx_t n, idx_t s) |
| 5 | __attribute__ ((__malloc__)) |
| 6 | __attribute__ ((__malloc__ (rpl_free, 1))) |
| 7 | __attribute__ ((__alloc_size__ (1, 2))) |
| 8 | __attribute__ ((__returns_nonnull__)); |
| 9 | |
| 10 | void * |
| 11 | xizalloc (idx_t s) |
| 12 | { |
| 13 | return xicalloc (s, 1); |
| 14 | } |