This is the mail archive of the
mailing list for the GCC project.
Re: are malloc/new calls annotated if they may return NULL?
On Mon, 2005-01-17 at 11:04 -0700, Tom Tromey wrote:
> >>>>> "Ian" == Ian Lance Taylor <email@example.com> writes:
> >> Interestingly, when I look through gcc/gcc, I can't find any real uses
> >> of DECL_IS_MALLOC. Some code sets it, and some code tests it to copy
> >> the flag to a new decl, but nothing actually seems to use it. Am I
> >> missing something?
> Ian> handle_malloc_attribute() in c-common.c.
> This sets the flag on a decl. Nothing I can find meaningfully reads
> the flag.
Most things check the call flags for ECF_MALLOC.
Doesn't that get created from DECL_IS_MALLOC at some point?