Debian Codegraph @

gcc/testsuite/c-c++-common/analyzer/attr-malloc-5.c

raw
1 /* Example of extra argument to "malloc" attribute. */
2
3 struct foo;
4 extern void foo_release (int, struct foo *);
5 extern struct foo *foo_acquire (void)
6 __attribute__ ((malloc (foo_release, 2)));
7
8 void test_1 (void)
9 {
10 struct foo *p = foo_acquire ();
11 foo_release (0, p);
12 }