[mainline] PATCH to diagnostic.[hc]

Gabriel Dos Reis gdr@integrable-solutions.net
Wed Apr 30 16:14:00 GMT 2003


"Joseph S. Myers" <jsm28@cam.ac.uk> writes:

| On Wed, 30 Apr 2003 gcc@integrable-solutions.net wrote:
| 
| > + static inline void
| > + output_pointer (output_buffer *buffer, void *p)
| > + {
| > +   output_formatted_scalar (buffer, "%p", p);
| > + }
| 
| Should be HOST_PTR_PRINTF (some hosts with pre-C89 libraries may not
| support %p in sprintf).

with this.

-- Gaby
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ChangeLog,v
retrieving revision 1.17645
diff -p -r1.17645 ChangeLog
*** ChangeLog	30 Apr 2003 14:17:25 -0000	1.17645
--- ChangeLog	30 Apr 2003 16:12:15 -0000
***************
*** 1,3 ****
--- 1,7 ----
+ 2003-04-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
+ 
+ 	* diagnostic.c (output_pointer): Use HOST_PTR_PRINTF.
+ 
  2003-04-30  Andreas Schwab  <schwab@suse.de>
  
  	* doc/extend.texi (Other Builtins): Enclose multiple word data
Index: diagnostic.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/diagnostic.c,v
retrieving revision 1.104
diff -p -r1.104 diagnostic.c
*** diagnostic.c	30 Apr 2003 12:54:28 -0000	1.104
--- diagnostic.c	30 Apr 2003 16:12:15 -0000
*************** output_long_hexadecimal (output_buffer *
*** 352,358 ****
  static inline void
  output_pointer (output_buffer *buffer, void *p)
  {
!   output_formatted_scalar (buffer, "%p", p);
  }
  
  /* Append to BUFFER a string specified by its STARTING character
--- 352,358 ----
  static inline void
  output_pointer (output_buffer *buffer, void *p)
  {
!   output_formatted_scalar (buffer, HOST_PTR_PRINTF, p);
  }
  
  /* Append to BUFFER a string specified by its STARTING character



More information about the Gcc-patches mailing list