method.c (build_decl_overload_real): Check whether we are in :: before returning...
authorMartin v. Löwis <loewis@informatik.hu-berlin.de>
Fri, 14 Jan 2000 23:42:10 +0000 (23:42 +0000)
committerMartin v. Löwis <loewis@gcc.gnu.org>
Fri, 14 Jan 2000 23:42:10 +0000 (23:42 +0000)
* method.c (build_decl_overload_real): Check whether we are in ::
before returning __builtin_new/delete.

From-SVN: r31431

gcc/cp/ChangeLog
gcc/cp/method.c

index 240aa069b09521f6d13634398695162190d68787..619d94c5c83655062596afb5d0a26da8303e6408 100644 (file)
@@ -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.
index 12d96168001c392034089fd6c4ca61101f7a3ec4..ba8d5941130c0eee3c2bbed1cba5d41a82721794 100644 (file)
@@ -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])