On 6/6/19 9:17 AM, Martin Sebor wrote:
> On 6/6/19 2:01 AM, Martin Liška wrote:
>> Hi.
>>
>> The patch is about addition of warn_unused_attribute for malloc-like
>> function.
>>
>> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
> 
> I like this change (as you know :)  Just one question: should
> all allocation functions be also annotated, including the two
> variants of __builtin_alloca_with_align and
> __builtin_posix_memalign?
> 
> As a separate comment, to get the benefit of the attribute in
> GCC we might want to also annotate the wrappers in libiberty.h
> and perhaps also some (many?) of the functions in tree.h.
> (This is just a suggestion to think about independent of your
> change.)
I like it conceptually as well -- I think the glibc guys had pretty good
results exposing latent issues when they went through and did the
necessary markup for WUR warnings.

Jeff

Reply via email to