X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fmips-tfile.c;h=1475e9599db122e3f06cd1b4c986de5d2e866f96;hb=7ef5673218d8691ed5ae75852b41920ee2f7bab2;hp=7a122a1e88a944d2178cef4a677d8536ca786db4;hpb=e46a4556a9e1e616bd1935f5d8f4bd58b39bf953;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/mips-tfile.c b/gcc/mips-tfile.c index 7a122a1e88a..1475e9599db 100644 --- a/gcc/mips-tfile.c +++ b/gcc/mips-tfile.c @@ -3,7 +3,8 @@ in the form of comments (the mips assembler does not support assembly access to debug information). Copyright (C) 1991, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + Free Software Foundation, Inc. Contributed by Michael Meissner (meissner@cygnus.com). This file is part of GCC. @@ -56,7 +57,7 @@ along with GCC; see the file COPYING3. If not see The auxiliary table is a series of 32 bit integers, that are referenced as needed from the local symbol table. Unlike standard - COFF, the aux. information does not follow the symbol that uses + COFF, the aux. information does not follow the symbol that uses it, but rather is a separate table. In theory, this would allow the MIPS compilers to collapse duplicate aux. entries, but I've not noticed this happening with the 1.31 compiler suite. The different @@ -674,8 +675,6 @@ main (void) #include "gstab.h" -#define STAB_CODE_TYPE enum __stab_debug_code - #ifndef MALLOC_CHECK #ifdef __SABER__ #define MALLOC_CHECK @@ -1938,8 +1937,8 @@ add_ext_symbol (EXTR *esym, int ifd) if (debug > 1) { long value = esym->asym.value; - const char *sc_str = sc_to_string (esym->asym.sc); - const char *st_str = st_to_string (esym->asym.st); + const char *sc_str = sc_to_string ((sc_t) esym->asym.sc); + const char *st_str = st_to_string ((st_t) esym->asym.st); fprintf (stderr, "\tesym\tv= %10ld, ifd= %2d, sc= %-12s", @@ -2855,7 +2854,8 @@ parse_def (const char *name_start) { int ch2; arg_number = strtol (arg_start, (char **) &arg_end_p1, 0); - if (arg_end_p1 != arg_start || ((ch2 = *arg_end_p1) != ';') || ch2 != ',') + /* It's only a number if followed by ';' or ','. */ + if (arg_end_p1 != arg_start && (((ch2 = *arg_end_p1) == ';') || ch2 == ',')) arg_was_number++; } @@ -2911,7 +2911,7 @@ parse_def (const char *name_start) { int ch2; arg_number = strtol (arg_start, (char **) &arg_end_p1, 0); - if (arg_end_p1 != arg_start || ((ch2 = *arg_end_p1) != ';') || ch2 != ',') + if (arg_end_p1 != arg_start && (((ch2 = *arg_end_p1) == ';') || ch2 == ',')) arg_was_number++; if (t_ptr == &temp_array[0]) @@ -2985,7 +2985,7 @@ parse_def (const char *name_start) { int ch2; arg_number = strtol (arg_start, (char **) &arg_end_p1, 0); - if (arg_end_p1 != arg_start || ((ch2 = *arg_end_p1) != ';') || ch2 != ',') + if (arg_end_p1 != arg_start && (((ch2 = *arg_end_p1) == ';') || ch2 == ',')) arg_was_number++; if (t_ptr == &temp_array[0]) @@ -3473,7 +3473,8 @@ mark_stabs (const char *start ATTRIBUTE_UNUSED) stabs_seen = 1; (void) add_local_symbol (stabs_symbol, stabs_symbol + sizeof (stabs_symbol), - stNil, scInfo, -1, MIPS_MARK_STAB (0)); + (st_t) stNil, (sc_t) scInfo, -1, + MIPS_MARK_STAB (0)); } } @@ -3666,8 +3667,8 @@ parse_stabs_common (const char *string_start, /* start of string or NULL */ /* Traditionally, N_LBRAC and N_RBRAC are *not* relocated. */ if (code == (int) N_LBRAC || code == (int) N_RBRAC) { - sc = scNil; - st = stNil; + sc = (sc_t) scNil; + st = (st_t) stNil; } else { @@ -3992,7 +3993,8 @@ write_varray (varray_t *vp, /* virtual array */ return; if (debug) - fprintf (stderr, "\twarray\tvp = %p, offset = %7lu, size = %7lu, %s\n", + fprintf (stderr, "\twarray\tvp = " HOST_PTR_PRINTF + ", offset = %7lu, size = %7lu, %s\n", (void *) vp, (unsigned long) offset, vp->num_allocated * vp->object_size, str); @@ -4031,7 +4033,8 @@ write_object (void) off_t offset; if (debug) - fprintf (stderr, "\n\twrite\tvp = %p, offset = %7u, size = %7lu, %s\n", + fprintf (stderr, "\n\twrite\tvp = " HOST_PTR_PRINTF + ", offset = %7u, size = %7lu, %s\n", (void *) &symbolic_header, 0, (unsigned long) sizeof (symbolic_header), "symbolic header"); @@ -4061,7 +4064,8 @@ write_object (void) pfatal_with_name (object_name); if (debug) - fprintf (stderr, "\twrite\tvp = %p, offset = %7lu, size = %7lu, %s\n", + fprintf (stderr, "\twrite\tvp = " HOST_PTR_PRINTF + ", offset = %7lu, size = %7lu, %s\n", (void *) &orig_linenum, (long) symbolic_header.cbLineOffset, (long) symbolic_header.cbLine, "Line numbers"); @@ -4092,7 +4096,8 @@ write_object (void) pfatal_with_name (object_name); if (debug) - fprintf (stderr, "\twrite\tvp = %p, offset = %7lu, size = %7lu, %s\n", + fprintf (stderr, "\twrite\tvp = " HOST_PTR_PRINTF + ", offset = %7lu, size = %7lu, %s\n", (void *) &orig_opt_syms, (long) symbolic_header.cbOptOffset, num_write, "Optimizer symbols"); @@ -4180,7 +4185,8 @@ write_object (void) file_ptr = file_ptr->next_file) { if (debug) - fprintf (stderr, "\twrite\tvp = %p, offset = %7lu, size = %7lu, %s\n", + fprintf (stderr, "\twrite\tvp = " HOST_PTR_PRINTF + ", offset = %7lu, size = %7lu, %s\n", (void *) &file_ptr->fdr, file_offset, (unsigned long) sizeof (FDR), "File header"); @@ -4212,7 +4218,8 @@ write_object (void) pfatal_with_name (object_name); if (debug) - fprintf (stderr, "\twrite\tvp = %p, offset = %7lu, size = %7lu, %s\n", + fprintf (stderr, "\twrite\tvp = " HOST_PTR_PRINTF + ", offset = %7lu, size = %7lu, %s\n", (void *) &orig_rfds, (long) symbolic_header.cbRfdOffset, num_write, "Relative file descriptors"); @@ -4469,7 +4476,7 @@ copy_object (void) (in case there are duplicate filenames, we collapse them into one file section, the MIPS assembler may or may not collapse them). */ - remap_file_number = alloca (sizeof (int) * orig_sym_hdr.ifdMax); + remap_file_number = (int *) alloca (sizeof (int) * orig_sym_hdr.ifdMax); for (fd = delete_ifd; fd < orig_sym_hdr.ifdMax; fd++) { @@ -4779,7 +4786,7 @@ main (int argc, char **argv) if (version) { printf (_("mips-tfile %s%s\n"), pkgversion_string, version_string); - fputs ("Copyright (C) 2008 Free Software Foundation, Inc.\n", stdout); + fputs ("Copyright (C) 2010 Free Software Foundation, Inc.\n", stdout); fputs (_("This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"), stdout); @@ -5005,7 +5012,7 @@ allocate_cluster (Size_t npages) pfatal_with_name ("allocate_cluster"); if (debug > 3) - fprintf (stderr, "\talloc\tnpages = %lu, value = %p\n", + fprintf (stderr, "\talloc\tnpages = %lu, value = " HOST_PTR_PRINTF "\n", (unsigned long) npages, (void *) ptr); return ptr;