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]

PATCH to improve printing of namespace-qualified classes



This patch fixes some confusion between DECL_CONTEXT/CP_DECL_CONTEXT
in error.c.

-- 
Mark Mitchell 			mark@markmitchell.com
Mark Mitchell Consulting	http://www.markmitchell.com

1998-08-30  Mark Mitchell  <mark@markmitchell.com>

	* error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
	comparing with global_namespace.
	(dump_aggr_type): Likewise.

Index: error.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/error.c,v
retrieving revision 1.50
diff -c -p -r1.50 error.c
*** error.c	1998/07/28 01:02:53	1.50
--- error.c	1998/08/31 00:05:17
*************** dump_aggr_type (t, v, canonical_name)
*** 352,358 ****
    
    name = TYPE_NAME (canonical_name ? TYPE_MAIN_VARIANT (t) : t);
  
!   if (name && DECL_CONTEXT (name) && DECL_CONTEXT (name) != global_namespace)
      {
        /* FUNCTION_DECL or RECORD_TYPE */
        dump_decl (DECL_CONTEXT (name), 0);
--- 352,358 ----
    
    name = TYPE_NAME (canonical_name ? TYPE_MAIN_VARIANT (t) : t);
  
!   if (name && CP_DECL_CONTEXT (name) != global_namespace)
      {
        /* FUNCTION_DECL or RECORD_TYPE */
        dump_decl (DECL_CONTEXT (name), 0);
*************** dump_decl (t, v)
*** 728,734 ****
        break;
  
      case NAMESPACE_DECL:
!       if (DECL_CONTEXT (t) != global_namespace)
  	{
  	  dump_decl (DECL_CONTEXT (t), v);
  	  OB_PUTC2 (':',':');
--- 728,734 ----
        break;
  
      case NAMESPACE_DECL:
!       if (CP_DECL_CONTEXT (t) != global_namespace)
  	{
  	  dump_decl (DECL_CONTEXT (t), v);
  	  OB_PUTC2 (':',':');


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