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]

Fix -Werror bootstrap failure in dwarf2out.c


My upstream DNS server still seems to have the old address of gcc.gnu.org
cached, so I don't know if this has already been reported.

On alphaev6-unknown-linux-gnu, when configured and built with

/bin/rm -rf * ; ../configure --prefix=/usr/local/gcc-3.4 --disable-checking; make -j 4 bootstrap > & build.log

bootstrap fails with

stage1/xgcc -Bstage1/ -B/usr/local/gcc-3.4/alphaev6-unknown-linux-gnu/bin/ -c -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -Werror   -DHAVE_CONFIG_H    -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/config -I../../gcc/../include ../../gcc/dwarf2out.c -o dwarf2out.o
../../gcc/dwarf2out.c: In function `lookup_filename':
../../gcc/dwarf2out.c:12349: warning: unsigned int format, different type arg (arg 3)
make[2]: *** [dwarf2out.o] Error 1

which is a nasty warning in any case on a 64-bit machine.  Here's a possible
fix.

Brad

Sorry, I usually build changelogs in the right format by checking with
the cvs@gcc.gnu.org web page, and I can't find one of my previous ones
to copy.

===================================================================
RCS file: RCS/dwarf2out.c,v
retrieving revision 1.1
diff -cp -r1.1 dwarf2out.c
*** dwarf2out.c	2003/01/22 00:00:12	1.1
--- dwarf2out.c	2003/01/22 00:05:06
*************** lookup_filename (file_name)
*** 12346,12352 ****
  
    if (DWARF2_ASM_LINE_DEBUG_INFO)
      {
!       fprintf (asm_out_file, "\t.file %u ", i);
        output_quoted_string (asm_out_file, file_name);
        fputc ('\n', asm_out_file);
      }
--- 12346,12352 ----
  
    if (DWARF2_ASM_LINE_DEBUG_INFO)
      {
!       fprintf (asm_out_file, "\t.file %lu ", (unsigned long int)i);
        output_quoted_string (asm_out_file, file_name);
        fputc ('\n', asm_out_file);
      }


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