This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix PR c/14411
On Mon, 22 Nov 2004, Zack Weinberg wrote:
> Calling it "attribute malloc" is somewhat better motivated - all
> functions to which attribute malloc might reasonably be applied, have
> a broad category of properties in common with malloc itself. We
> happen only to use the one property that the pointer it returns cannot
> alias anything at that point, but we could use others (for instance, I
> personally think it would be reasonable to optimize out a call to
> malloc if its return value was discarded - others may dispute this).
I did in fact document the specific meaning of attribute malloc when this
was queried in bug 3414. But malloc seems more closely tied to the
meaning of "returns new memory" than setjmp is to "returns twice",
especially given the otherwise unrelated vfork which shares that property.
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
email@example.com (personal mail)
firstname.lastname@example.org (CodeSourcery mail)
email@example.com (Bugzilla assignments and CCs)