diff options
author | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-22 08:31:03 +0000 |
---|---|---|
committer | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-22 08:31:03 +0000 |
commit | fdf539936c6c1fe60e66e2ff2d516c6324352d4e (patch) | |
tree | 2f6a29ba43eda735e704982beaccd5a2c3dd5e71 /gcc | |
parent | b58456b5b9869a918600851c26a11de779203633 (diff) | |
download | ppe42-gcc-fdf539936c6c1fe60e66e2ff2d516c6324352d4e.tar.gz ppe42-gcc-fdf539936c6c1fe60e66e2ff2d516c6324352d4e.zip |
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
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120145 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/decl.c | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index caad0ec0fd5..5009ebaa251 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,11 @@ 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> + PR C++/30168 * optimize.c (update_cloned_parm): Copy DECL_GIMPLE_REG_P also. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 5c7d508fc3e..6a46636ea10 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -3402,17 +3402,17 @@ cxx_builtin_function (tree decl) { tree id = DECL_NAME (decl); const char *name = IDENTIFIER_POINTER (id); - tree decl2 = copy_node(decl); /* All builtins that don't begin with an '_' should additionally go in the 'std' namespace. */ if (name[0] != '_') { + tree decl2 = copy_node(decl); push_namespace (std_identifier); - builtin_function_1 (decl, std_node); + builtin_function_1 (decl2, std_node); 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 |