builtin-alloc-size.c
1.49 KB
-
PR c/78668 - aligned_alloc, realloc, et al. missing attribute alloc_size · 5dcf4561
gcc/ChangeLog: PR c/78668 * builtin-attrs.def (ATTR_ALLOC_SIZE, ATTR_RETURNS_NONNULL): New identifier tree nodes. (ATTR_ALLOCA_SIZE_1_NOTHROW_LEAF_LIST): New attribute list. (ATTR_MALLOC_SIZE_1_NOTHROW_LIST): Same. (ATTR_MALLOC_SIZE_1_NOTHROW_LEAF_LIST): Same. (ATTR_MALLOC_SIZE_1_2_NOTHROW_LEAF_LIST): Same. (ATTR_ALLOC_SIZE_2_NOTHROW_LEAF_LIST): Same. * builtins.def (aligned_alloc, calloc, malloc, realloc): Add attribute alloc_size. (alloca): Add attribute alloc_size and returns_nonnull. gcc/testsuite/ChangeLog: PR c/78668 * gcc.dg/builtin-alloc-size.c: New test. From-SVN: r243231
Martin Sebor committed