This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: More function decorations II (pool_allocator, mt_allocator, debug, stl_list)
- From: Richard Guenther <rguenther at suse dot de>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, libstdc++ at gcc dot gnu dot org, mjambor at suse dot cz
- Date: Mon, 20 Apr 2009 10:31:10 +0200 (CEST)
- Subject: Re: More function decorations II (pool_allocator, mt_allocator, debug, stl_list)
- References: <20090417142039.GC17694@kam.mff.cuni.cz> <49E89800.9010400@oracle.com>
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.