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]

eliminate dwarf2out.c bootstrap warning


Howdy,

A recent bootstrap on i686-pc-linux-gnu reported the following
warning:

 /home/kraai/src/gcc/gcc/dwarf2out.c: In function `output_call_frame_info':
 /home/kraai/src/gcc/gcc/dwarf2out.c:1719: warning: int format, long unsigned int arg (arg 4)

The attached patch fixes this problem by casting the label
identifier number to an unsigned int before outputing it, just as
is done when sprintfing the name into a string.  The resulting
compiler bootstrapped on i686-pc-linux-gnu (with one fewer
warning).

Matt

2001-03-13  Matt Kraai  <kraai@alumni.carnegiemellon.edu>

	* config/elfos.h (ASM_OUTPUT_INTERNAL_LABEL): Cast internal
	label number to unsigned.

Index: gcc/config/elfos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/elfos.h,v
retrieving revision 1.25
diff -c -3 -p -r1.25 elfos.h
*** elfos.h	2001/02/07 05:43:59	1.25
--- elfos.h	2001/03/13 19:37:22
*************** Boston, MA 02111-1307, USA.  */
*** 147,153 ****
  #define ASM_OUTPUT_INTERNAL_LABEL(FILE, PREFIX, NUM)	\
    do							\
      {							\
!       fprintf (FILE, ".%s%d:\n", PREFIX, NUM);		\
      }							\
    while (0)
  
--- 147,153 ----
  #define ASM_OUTPUT_INTERNAL_LABEL(FILE, PREFIX, NUM)	\
    do							\
      {							\
!       fprintf (FILE, ".%s%u:\n", PREFIX, (unsigned) (NUM));		\
      }							\
    while (0)
  


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