gcc/testsuite/c-c++-common/analyzer/function-ptr-3.c
raw| 1 | /* { dg-skip-if "requires hosted libstdc++ for stdlib size_t" { ! hostedlib } } */ |
| 2 | |
| 3 | #include <stdlib.h> |
| 4 | |
| 5 | typedef void *(*alloc_func_t) (size_t); |
| 6 | typedef void (*free_func_t) (void *); |
| 7 | |
| 8 | typedef struct callbacks |
| 9 | { |
| 10 | alloc_func_t alloc_cb; |
| 11 | free_func_t dealloc_cb; |
| 12 | } callbacks_t; |
| 13 | |
| 14 | void test (void) |
| 15 | { |
| 16 | callbacks_t cb; |
| 17 | cb.alloc_cb = (alloc_func_t)0; |
| 18 | cb.dealloc_cb = (free_func_t)0; |
| 19 | } |