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]

PATCH to add output_add_identifier


The absence of this function seems like an oversight.  Applied to trunk.
(to be used in some of the c-pretty-print code).

2002-09-12  Jason Merrill  <jason@redhat.com>

	* diagnostic.c (output_add_identifier): New fn.
	* diagnostic.h: Declare it.

*** diagnostic.c.~1~	Wed Sep  4 16:18:01 2002
--- diagnostic.c	Fri Aug 30 20:34:25 2002
*************** output_add_string (buffer, str)
*** 463,468 ****
--- 463,478 ----
    maybe_wrap_text (buffer, str, str + (str ? strlen (str) : 0));
  }
  
+ /* Append an identifier ID to BUFFER.  */
+ void
+ output_add_identifier (buffer, id)
+      output_buffer *buffer;
+      tree id;
+ {
+   output_append (buffer, IDENTIFIER_POINTER (id),
+ 		 IDENTIFIER_POINTER (id) + IDENTIFIER_LENGTH (id));
+ }
+ 
  /* Flush the content of BUFFER onto the attached stream,
     and reinitialize.  */
  
*** diagnostic.h.~1~	Wed Sep  4 16:18:01 2002
--- diagnostic.h	Wed Aug 28 15:44:05 2002
*************** extern void output_add_character	PARAMS 
*** 316,321 ****
--- 316,322 ----
  extern void output_decimal		PARAMS ((output_buffer *, int));
  extern void output_add_string		PARAMS ((output_buffer *,
  						 const char *));
+ extern void output_add_identifier	PARAMS ((output_buffer *, tree));
  extern const char *output_finalize_message PARAMS ((output_buffer *));
  extern void output_clear_message_text	PARAMS ((output_buffer *));
  extern void output_printf		PARAMS ((output_buffer *, const char *,

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