On 08/03/2011 08:46 AM, Richard Guenther wrote:
If that's reasonable then adding the malloc attribute should be, too.
Finally. Please. Doesn't C++0x maybe "fix" the issue we were
discussing to death?
Nope, as far as I can tell nobody raised it with the committee. I have now.
I think we ought to be able to assume that a program which accesses the
allocated storage other than through the returned pointer has undefined
behavior. I think that would be enough for attribute malloc, and I
don't think that would interfere with reasonable pool allocators.
Jason