OSDN Git Service

* include/c_std/std_cmath.h: To prevent problems overloading
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 29 Mar 2002 20:41:53 +0000 (20:41 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 29 Mar 2002 20:41:53 +0000 (20:41 +0000)
commitae8cbbc840e99bad6daf843f557d9e0c0452833b
tree187fa816b67c22e5eb8cf4e72e061f67f62adfcc
parentb0543a68fb3e4589129e08ac276338c4790206b8
* include/c_std/std_cmath.h:  To prevent problems overloading
g++ builtins, use the double variants from the global namespace
before defining float and long double variants in std::.

PR c++/5998:
* decl.c (cxx_init_decl_processing): Re-enable built-in functions
in the g++ front-end.
(duplicate_decl): Allow redefinition of anticipated built-ins.
Fix inlining problem by over-writing the old DECL_RTL.
(lookup_namespace_name): Fail to find an identifier in the
specified namespace if its still anticipated.
(builtin_function_1): New function split out from builtin_function
to create a builtin in the current namespace with given context.
(builtin_function): Call builtin_function_1 to define the
appropriate builtins in both the std and global namespaces.
(select_decl): Don't test for anticipated decls here.
(unqualified_namespace_lookup): Instead ignore them whilst
searching through scopes and namespaces.
* decl2.c (do_nonmember_using_decl): If a using declaration
specifies an anticipated built-in function, mark it as no longer
anticipated in that scope.
(ambiguous_decl):  Avoid resolving to an anticipated decl.
* lex.c (do_scoped_id): Fail to find an identifier in the global
namespace if its still anticipated.

* g++.old-deja/g++.other/builtins5.C: New test.
* g++.old-deja/g++.other/builtins6.C: New test.
* g++.old-deja/g++.other/builtins7.C: New test.
* g++.old-deja/g++.other/builtins8.C: New test.
* g++.old-deja/g++.other/builtins9.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51568 138bc75d-0d04-0410-961f-82ee72b054a4
12 files changed:
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/lex.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.other/builtins5.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/builtins6.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/builtins7.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/builtins8.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/builtins9.C [new file with mode: 0644]
libstdc++-v3/ChangeLog
libstdc++-v3/include/c_std/std_cmath.h