This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Qualified friends


>>>>> 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 ----

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]