This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] C++: Honor std:: for terminate() and other lib funcs
- To: gcc-patches at gcc dot gnu dot org
- Subject: [PATCH] C++: Honor std:: for terminate() and other lib funcs
- From: Chip Salzenberg <chip at valinux dot com>
- Date: Sun, 28 May 2000 23:01:55 -0700
While libgcc is willing to _define_ terminate() in the std namespace,
g++ isn't willing to _reference_ it there. Thus, this patch.
-----------------------------------------------------------------------
2000-05-28 Chip Salzenberg <chip@valinux.com>
* decl.c (build_cp_library_fn): Honor current namespace.
diff -u -2 -p -r1.615 decl.c
--- decl.c 2000/05/28 02:58:14 1.615
+++ decl.c 2000/05/29 05:54:00
@@ -6806,5 +6806,6 @@ build_library_fn (name, type)
}
-/* Returns the _DECL for a library function with C++ linkage. */
+/* Returns the _DECL for a library function with C++ linkage
+ in the current namespace (which should be global or std). */
static tree
@@ -6815,4 +6816,6 @@ build_cp_library_fn (name, operator_code
{
tree fn = build_library_fn_1 (name, operator_code, type);
+ if (current_namespace != global_namespace)
+ DECL_CONTEXT (fn) = current_namespace;
TREE_NOTHROW (fn) = TYPE_NOTHROW_P (type);
set_mangled_name_for_decl (fn);
--
Chip Salzenberg - a.k.a. - <chip@valinux.com>
"I wanted to play hopscotch with the impenetrable mystery of existence,
but he stepped in a wormhole and had to go in early." // MST3K