This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2017-02-28.08:54:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1488272050.61.0.409487721584.issue29674@psf.upfronthosting.co.za>
In-reply-to
Content
GCC allows to get "size" parameters of functions allocating memory to emit better warning. For example, GCC 7 will detect implicit cast from signed to unsigned integer and emit a warning.

https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html

Example of Python functions that can benefit of this attribute:

* PyMem_RawMalloc(), PyMem_RawCalloc(), PyMem_RawRealloc()
* PyMem_Malloc(), PyMem_Calloc(), PyMem_Realloc()
* PyObject_Malloc(), PyObject_Calloc(), PyObject_Realloc()
History
Date User Action Args
2017-02-28 08:54:10vstinnersetrecipients: + vstinner
2017-02-28 08:54:10vstinnersetmessageid: <1488272050.61.0.409487721584.issue29674@psf.upfronthosting.co.za>
2017-02-28 08:54:10vstinnerlinkissue29674 messages
2017-02-28 08:54:10vstinnercreate