re PR c++/30225 (builtins's decl is copied in some cases where it is not needed to be copied)
2006-12-21 Andrew Pinski <pinskia@gmail.com> PR C++/30225 * decl.c (cxx_builtin_function): Only copy the decl if adding it to the std namespace From-SVN: r120145
This commit is contained in:
parent
b3c4918f98
commit
e5b44dfb3e
|
@ -1,3 +1,9 @@
|
||||||
|
2006-12-21 Andrew Pinski <pinskia@gmail.com>
|
||||||
|
|
||||||
|
PR C++/30225
|
||||||
|
* decl.c (cxx_builtin_function): Only copy the decl if adding
|
||||||
|
it to the std namespace.
|
||||||
|
|
||||||
2006-12-21 Andrew Pinski <pinskia@gmail.com>
|
2006-12-21 Andrew Pinski <pinskia@gmail.com>
|
||||||
|
|
||||||
PR C++/30168
|
PR C++/30168
|
||||||
|
|
|
@ -3402,17 +3402,17 @@ cxx_builtin_function (tree decl)
|
||||||
{
|
{
|
||||||
tree id = DECL_NAME (decl);
|
tree id = DECL_NAME (decl);
|
||||||
const char *name = IDENTIFIER_POINTER (id);
|
const char *name = IDENTIFIER_POINTER (id);
|
||||||
tree decl2 = copy_node(decl);
|
|
||||||
/* All builtins that don't begin with an '_' should additionally
|
/* All builtins that don't begin with an '_' should additionally
|
||||||
go in the 'std' namespace. */
|
go in the 'std' namespace. */
|
||||||
if (name[0] != '_')
|
if (name[0] != '_')
|
||||||
{
|
{
|
||||||
|
tree decl2 = copy_node(decl);
|
||||||
push_namespace (std_identifier);
|
push_namespace (std_identifier);
|
||||||
builtin_function_1 (decl, std_node);
|
builtin_function_1 (decl2, std_node);
|
||||||
pop_namespace ();
|
pop_namespace ();
|
||||||
}
|
}
|
||||||
|
|
||||||
return builtin_function_1 (decl2, NULL_TREE);
|
return builtin_function_1 (decl, NULL_TREE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Generate a FUNCTION_DECL with the typical flags for a runtime library
|
/* Generate a FUNCTION_DECL with the typical flags for a runtime library
|
||||||
|
|
Loading…
Reference in New Issue