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]

RFA: macro debug info: don't emit spaces in formal parameter list



2002-03-29  Jim Blandy  <jimb@redhat.com>

	* cppmacro.c (cpp_macro_definition): Do not emit spaces after
	macro formal parameter names.

Index: gcc/cppmacro.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cppmacro.c,v
retrieving revision 1.95
diff -c -r1.95 cppmacro.c
*** gcc/cppmacro.c	2002/03/19 21:43:39	1.95
--- gcc/cppmacro.c	2002/03/29 19:45:46
***************
*** 1508,1517 ****
    len = NODE_LEN (node) + 1;			/* ' ' */
    if (macro->fun_like)
      {
!       len += 3;		/* "()" plus possible final "." of named
! 			   varargs (we have + 2 below).  */
        for (i = 0; i < macro->paramc; i++)
! 	len += NODE_LEN (macro->params[i]) + 2; /* ", " */
      }
  
    for (i = 0; i < macro->count; i++)
--- 1508,1517 ----
    len = NODE_LEN (node) + 1;			/* ' ' */
    if (macro->fun_like)
      {
!       len += 4;		/* "()" plus possible final ".." of named
! 			   varargs (we have + 1 below).  */
        for (i = 0; i < macro->paramc; i++)
! 	len += NODE_LEN (macro->params[i]) + 1; /* "," */
      }
  
    for (i = 0; i < macro->count; i++)
***************
*** 1554,1560 ****
  	    }
  
  	  if (i + 1 < macro->paramc)
! 	    *buffer++ = ',', *buffer++ = ' ';
  	  else if (macro->variadic)
  	    *buffer++ = '.', *buffer++ = '.', *buffer++ = '.';
  	}
--- 1554,1563 ----
  	    }
  
  	  if (i + 1 < macro->paramc)
!             /* Don't emit a space after the comma here; we're trying
!                to emit a Dwarf-friendly definition, and the Dwarf spec
!                forbids spaces in the argument list.  */
! 	    *buffer++ = ',';
  	  else if (macro->variadic)
  	    *buffer++ = '.', *buffer++ = '.', *buffer++ = '.';
  	}


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