aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorloewis <loewis@138bc75d-0d04-0410-961f-82ee72b054a4>2000-01-14 23:42:10 +0000
committerloewis <loewis@138bc75d-0d04-0410-961f-82ee72b054a4>2000-01-14 23:42:10 +0000
commite76ab83f26f9e8cbfe00af0447fb031cb2e42677 (patch)
treeb9dea4d023116cbd2989c8c11a93ed8abf4c52cb
parenta71707647fc18fa21d9c600b23b7d8ec9f1a6718 (diff)
* method.c (build_decl_overload_real): Check whether we are in ::
before returning __builtin_new/delete. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31431 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/method.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 240aa069b09..619d94c5c83 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
+
+ * method.c (build_decl_overload_real): Check whether we are in ::
+ before returning __builtin_new/delete.
+
2000-01-13 Mark Mitchell <mark@codesourcery.com>
* pt.c (tsubst_friend_function): Improve comment.
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 12d96168001..ba8d5941130 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -1,6 +1,6 @@
/* Handle the hair of processing (but not expanding) inline functions.
Also manage function and variable name overloading.
- Copyright (C) 1987, 89, 92-97, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1987, 89, 92-99, 2000 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
@@ -1579,7 +1579,8 @@ build_decl_overload_real (dname, parms, ret_type, tparms, targs,
const char *name = IDENTIFIER_POINTER (dname);
/* member operators new and delete look like methods at this point. */
- if (! for_method && parms != NULL_TREE && TREE_CODE (parms) == TREE_LIST
+ if (! for_method && current_namespace == global_namespace
+ && parms != NULL_TREE && TREE_CODE (parms) == TREE_LIST
&& TREE_CHAIN (parms) == void_list_node)
{
if (dname == ansi_opname[(int) DELETE_EXPR])