1 /* An example where the deallocator requires non-NULL. */
4 extern void foo_release (struct foo
*)
5 __attribute__((nonnull
));
6 extern struct foo
*foo_acquire (void)
7 __attribute__ ((malloc (foo_release
)));
11 struct foo
*p
= foo_acquire (); /* { dg-message "this call could return NULL" } */
12 foo_release (p
); /* { dg-warning "use of possibly-NULL 'p' where non-null" } */
17 struct foo
*p
= foo_acquire ();