SPDX-License-Identifier: CC-BY-SA-4.0 copyrights: - Copyright (C) 2020 embedded brains GmbH & Co. KG enabled-by: true functional-type: function links: - role: interface-function uid: ../if/alloc-size rationale: null references: [] requirement-type: functional text: | When the code is compiled with the GNU C compiler, and the ${../if/alloc-size:/name} macro is used as last part of a function declaration, and ${../if/alloc-size:/params[0]/name} is a constant number referring to an argument of that function (counting of arguments starts at 1 from the left), and the declared function returns a pointer to memory with the size in bytes provided by the function argument number ${../if/alloc-size:/params[0]/name}, the macro shall cause the compiler to improve the correctness of ``__builtin_object_sizepointer`` analysis. type: requirement