This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Qualified friends
- To: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Subject: Re: Qualified friends
- From: Jason Merrill <jason at cygnus dot com>
- Date: 24 Jun 2000 15:15:47 -0700
- Cc: gcc-patches at gcc dot gnu dot org
- References: <199902210950.KAA08701@mira.isdn.cs.tu-berlin.de> <36D28C0A.48B5A68A@acm.org> <199902241126.MAA32306@mira.isdn.cs.tu-berlin.de>
>>>>> Martin v Loewis <martin@mira.isdn.cs.tu-berlin.de> writes:
> 1999-02-24 Martin von Lwis <loewis@informatik.hu-berlin.de>
> * decl.c (grokdeclarator): Set current_namespace when pushing
> friends.
> (grokfndecl): Likewise, for mangling.
I applied this instead:
2000-06-24 Jason Merrill <jason@redhat.com>
* decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
(push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
*** decl.c.~1~ Fri Jun 23 02:46:31 2000
--- decl.c Sat Jun 24 17:50:32 2000
*************** push_namespace (name)
*** 2369,2374 ****
--- 2369,2375 ----
level is set elsewhere. */
if (!global)
{
+ DECL_CONTEXT (d) = FROB_CONTEXT (current_namespace);
d = pushdecl (d);
pushlevel (0);
declare_namespace_level ();
*************** pushdecl (x)
*** 3829,3836 ****
&& !(TREE_CODE (x) == VAR_DECL && DECL_EXTERNAL (x))
&& !DECL_CONTEXT (x))
DECL_CONTEXT (x) = current_function_decl;
- if (!DECL_CONTEXT (x))
- DECL_CONTEXT (x) = FROB_CONTEXT (current_namespace);
/* If this is the declaration for a namespace-scope function,
but the declaration itself is in a local scope, mark the
--- 3830,3835 ----