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]
Other format: [Raw text]

Re: C++ PATCH: PR c++/14138


On Sunday, February 29, 2004, at 10:27 PM, Mark Mitchell wrote:
        if (nested_name_specifier)
! 	pop_p = push_scope (nested_name_specifier);
        /* Get the canonical version of this type.  */
        type = TYPE_MAIN_DECL (TREE_TYPE (type));
        if (PROCESSING_REAL_TEMPLATE_DECL_P ()
  	  && !CLASSTYPE_TEMPLATE_SPECIALIZATION (TREE_TYPE (type)))
  	type = push_template_decl (type);
        type = TREE_TYPE (type);
        if (nested_name_specifier)
  	{
  	  *nested_name_specifier_p = true;
! 	  if (pop_p)
! 	    pop_scope (nested_name_specifier);
  	}

Why not have push_scope remember the state behind the interface and have pop_scope do nothing if that saved state indicates it was a `fast' push? Advantages seem to be all the client code stays the same, the interface remains the same, conceptually it remains simpler...



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