This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: More function decorations II (pool_allocator, mt_allocator, debug, stl_list)


On Fri, 17 Apr 2009, Paolo Carlini wrote:

> Hi,
> > Hi,
> > this patch adds decorations to couple more files.  I guess nothing
> > earthshaking here.
> >   
> I see, patch is ok, thanks.
> > I wonder, should not be the allocators somehow marked via malloc
> > attribute?  That one provide very important hint for alias analysis and
> > also Martin's IPA stuff.
> >   
> I'd like to ear Richard first about this issue, because some problems we
> had in the past with dynamic memory allocation vs alias analysis were
> *really* nasty...

In my opinion adding attribute malloc to C++ new (_not_ the placement
new variants!) does not add any potential sources for miscompiles.
Miscompiles would (and still do!) happen if we inline news, but in
that case knowledge of attribute malloc is lost and thus the annotation
is a no-op.

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]