3401 cxx_builtin_function (tree decl) 3402 { 3403 tree id = DECL_NAME (decl); 3404 const char *name = IDENTIFIER_POINTER (id); 3405 tree decl2 = copy_node(decl); 3406 /* All builtins that don't begin with an '_' should additionally 3407 go in the 'std' namespace. */ 3408 if (name[0] != '_') 3409 { 3410 push_namespace (std_identifier); 3411 builtin_function_1 (decl, std_node); 3412 pop_namespace (); 3413 } 3414 3415 return builtin_function_1 (decl2, NULL_TREE); 3416 }
If we are not going to add the builtin function into the std namespace, we don't need to copy the decl -- Summary: builtins's decl is copied in some cases where it is not needed to be copied Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: memory-hog Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30225