[C++ PATCH] PR 30225 Improve adding of builtins memory usage

Andrew Pinski pinskia@gmail.com
Fri Dec 22 08:16:00 GMT 2006


The C++ front while adding the builtins to the global namespace and the
std namespace if needed, copies the builtin for adding it to the std
namespace except in some cases it does not add it to the std namespace.
So we just wasted a copy of the node.  This patch fixes that problem by
only doing the copy if we are going to add the builtin to the std
namespace.

OK?  Bootstrapped and tested on powerpc-darwin with no regressions.

Thanks,
Andrew Pinski

ChangeLog:


	* decl.c (cxx_builtin_function): Only copy the decl if adding
	it to the std namespace.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixpr30225.diff.txt
Type: text/x-patch
Size: 810 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061222/bf8b3d2b/attachment.bin>


More information about the Gcc-patches mailing list