From e59f7d3da148f6cd979808d1b5342b507a3918df Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Sun, 11 Nov 2001 05:56:47 +0000 Subject: [PATCH] unicosmk.h (ASM_OUTPUT_DOUBLE, [...]): Fix format specifier warning. * alpha/unicosmk.h (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT): Fix format specifier warning. * convex.h (ASM_OUTPUT_BYTE): Likewise. * elfos.h (ALIGN_ASM_OP): Undef before defining. * i386/att.h (ASM_GENERATE_INTERNAL_LABEL): Fix format specifier warning. * i386/bsd.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. * i386/gas.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. * i386-interix.h (gen_stdcall_suffix): Prototype. * i386.h (ASM_OUTPUT_BYTE): Fix format specifier warning. * i386elf.h (ASM_OUTPUT_FLOAT, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_LONG_DOUBLE): Likewise. * i386/interix.c (gen_stdcall_suffix): Const-ify. * i386/next.h (ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT, ASM_GENERATE_INTERNAL_LABEL): Fix format specifier warnings. * i386/osfrose.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. * i386/ptx4-i.h (ASM_OUTPUT_FLOAT, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_LONG_DOUBLE): Likewise. * i386/sco5.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. * i386/sequent.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. * i386/sun386.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. * i386/svr3dbx.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. * m68k/3b1.h (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_FLOAT, ASM_GENERATE_INTERNAL_LABEL): Likewise. * m68k/altos3068.h (ASM_OUTPUT_FLOAT_OPERAND): Likewise. * m68k/amix.h (ASM_OUTPUT_ASCII, ASM_GENERATE_INTERNAL_LABEL): Likewise. * m68k/atari.h (ASM_OUTPUT_ASCII, ASM_GENERATE_INTERNAL_LABEL): Likewise. * m68k/crds.h (ASM_OUTPUT_DOUBLE, PRINT_OPERAND): Likewise. * m68k/dpx2.h (ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT, ASM_OUTPUT_BYTE, ASM_OUTPUT_FLOAT_OPERAND): Likewise. * m68k/hp320.h (ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_BYTE): Likewise. * m68k.h (ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_BYTE): Likewise. * m68k/m68kv4.h (ASM_OUTPUT_ASCII): Delete unused variable. * m68k/mot3300.h (ASM_OUTPUT_BYTE): Fix format specifier warning. * m68k/news.h (PRINT_OPERAND): Likewise. * m68k/next.h (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT, ASM_OUTPUT_FLOAT_OPERAND, ASM_OUTPUT_DOUBLE_OPERAND): Likewise. * m68k/next21.h (ASM_OUTPUT_FLOAT_OPERAND): Likewise. * m68k/plexus.h (ASM_SPEC): Insert space between macro name and definition. * m68k/sgs.h (ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT, ASM_OUTPUT_ASCII, ASM_OUTPUT_FLOAT_OPERAND, ASM_OUTPUT_DOUBLE_OPERAND): Fix format specifier warnings. * m68k/sun3.h (ASM_OUTPUT_FLOAT_OPERAND): Likewise. * m68k/tower-as.h (ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_FLOAT, ASM_OUTPUT_BYTE, PRINT_OPERAND): Likewise. * m88k/m88k.h (ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_BYTE): Likewise. * mips/elf.h (PUT_SDB_SIZE, ASM_DECLARE_OBJECT_NAME): Likewise. * mips/elf64.h (PUT_SDB_SIZE, ASM_DECLARE_OBJECT_NAME): Likewise. * mips/iris5gas.h (PUT_SDB_SIZE): Likewise. * mips/linux.h (ASM_DECLARE_OBJECT_NAME): Likewise. * mips.c (mips_output_external_libcall): Mark parameter with ATTRIBUTE_UNUSED. (mips_asm_file_start): Move variable into the scope where it's used. * mips.h (PUT_SDB_INT_VAL, PUT_SDB_SIZE): Likewise. * mips/netbsd.h (ASM_DECLARE_OBJECT_NAME): Likewise. * mips/sni-gas.h (PUT_SDB_SIZE): Likewise. * ns32k/encore.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. * ns32k.c (print_operand): Likewise. * pa.c (print_operand, output_div_insn): Likewise. * pa.h (ASM_OUTPUT_MI_THUNK, ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_BYTE, PRINT_OPERAND_ADDRESS): Likewise. * pa/pa64-hpux.h (UNIQUE_SECTION): Const-ify. * sparc/linux.h (ASM_GENERATE_INTERNAL_LABEL): Fix format specifier warnings. * sparc/linux64.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. * sparc/pbd.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. (ASM_OUTPUT_SOURCE_LINE): Don't list macro arguments in undef. * sparc/vxsim.h (ASM_GENERATE_INTERNAL_LABEL): Fix format specifier warnings. * svr3.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. * sdbout.c (sdbout_end_epilogue): Mark parameter with ATTRIBUTE_UNUSED. * varasm.c (assemble_global): Likewise. From-SVN: r46922 --- gcc/ChangeLog | 87 ++++++++++++++++++++++++++++++++++ gcc/config/alpha/unicosmk.h | 6 +-- gcc/config/convex/convex.h | 2 +- gcc/config/elfos.h | 1 + gcc/config/i386/att.h | 2 +- gcc/config/i386/bsd.h | 4 +- gcc/config/i386/gas.h | 2 +- gcc/config/i386/i386-interix.h | 3 +- gcc/config/i386/i386.h | 2 +- gcc/config/i386/i386elf.h | 12 ++--- gcc/config/i386/interix.c | 4 +- gcc/config/i386/next.h | 9 ++-- gcc/config/i386/osfrose.h | 4 +- gcc/config/i386/ptx4-i.h | 12 ++--- gcc/config/i386/sco5.h | 4 +- gcc/config/i386/sequent.h | 2 +- gcc/config/i386/sun386.h | 2 +- gcc/config/i386/svr3dbx.h | 2 +- gcc/config/m68k/3b1.h | 8 ++-- gcc/config/m68k/altos3068.h | 2 +- gcc/config/m68k/amix.h | 6 +-- gcc/config/m68k/atari.h | 6 +-- gcc/config/m68k/crds.h | 6 +-- gcc/config/m68k/dpx2.h | 10 ++-- gcc/config/m68k/hp320.h | 4 +- gcc/config/m68k/m68k.h | 4 +- gcc/config/m68k/m68kelf.h | 2 +- gcc/config/m68k/m68kv4.h | 2 +- gcc/config/m68k/mot3300.h | 2 +- gcc/config/m68k/news.h | 2 +- gcc/config/m68k/next.h | 10 ++-- gcc/config/m68k/next21.h | 2 +- gcc/config/m68k/plexus.h | 2 +- gcc/config/m68k/sgs.h | 12 ++--- gcc/config/m68k/sun2o4.h | 2 +- gcc/config/m68k/sun3.h | 2 +- gcc/config/m68k/tower-as.h | 12 ++--- gcc/config/m88k/m88k.h | 4 +- gcc/config/mips/elf.h | 9 +++- gcc/config/mips/elf64.h | 9 +++- gcc/config/mips/iris5gas.h | 4 +- gcc/config/mips/linux.h | 4 +- gcc/config/mips/mips.c | 5 +- gcc/config/mips/mips.h | 8 +++- gcc/config/mips/netbsd.h | 5 +- gcc/config/mips/sni-gas.h | 6 ++- gcc/config/ns32k/encore.h | 2 +- gcc/config/ns32k/ns32k.c | 2 +- gcc/config/pa/pa.c | 16 ++++--- gcc/config/pa/pa.h | 22 ++++++--- gcc/config/pa/pa64-hpux.h | 6 +-- gcc/config/sparc/linux.h | 2 +- gcc/config/sparc/linux64.h | 2 +- gcc/config/sparc/pbd.h | 4 +- gcc/config/sparc/vxsim.h | 2 +- gcc/config/svr3.h | 2 +- gcc/sdbout.c | 2 +- gcc/varasm.c | 2 +- 58 files changed, 249 insertions(+), 125 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5430046f993..e2782cb351a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,90 @@ +2001-11-11 Kaveh R. Ghazi + + * alpha/unicosmk.h (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT): Fix + format specifier warning. + * convex.h (ASM_OUTPUT_BYTE): Likewise. + * elfos.h (ALIGN_ASM_OP): Undef before defining. + * i386/att.h (ASM_GENERATE_INTERNAL_LABEL): Fix format specifier + warning. + * i386/bsd.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. + * i386/gas.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. + * i386-interix.h (gen_stdcall_suffix): Prototype. + * i386.h (ASM_OUTPUT_BYTE): Fix format specifier warning. + * i386elf.h (ASM_OUTPUT_FLOAT, ASM_OUTPUT_DOUBLE, + ASM_OUTPUT_LONG_DOUBLE): Likewise. + * i386/interix.c (gen_stdcall_suffix): Const-ify. + * i386/next.h (ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, + ASM_OUTPUT_FLOAT, ASM_GENERATE_INTERNAL_LABEL): Fix format + specifier warnings. + * i386/osfrose.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. + * i386/ptx4-i.h (ASM_OUTPUT_FLOAT, ASM_OUTPUT_DOUBLE, + ASM_OUTPUT_LONG_DOUBLE): Likewise. + * i386/sco5.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. + * i386/sequent.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. + * i386/sun386.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. + * i386/svr3dbx.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. + * m68k/3b1.h (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_LONG_DOUBLE, + ASM_OUTPUT_FLOAT, ASM_GENERATE_INTERNAL_LABEL): Likewise. + * m68k/altos3068.h (ASM_OUTPUT_FLOAT_OPERAND): Likewise. + * m68k/amix.h (ASM_OUTPUT_ASCII, ASM_GENERATE_INTERNAL_LABEL): + Likewise. + * m68k/atari.h (ASM_OUTPUT_ASCII, ASM_GENERATE_INTERNAL_LABEL): + Likewise. + * m68k/crds.h (ASM_OUTPUT_DOUBLE, PRINT_OPERAND): Likewise. + * m68k/dpx2.h (ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, + ASM_OUTPUT_FLOAT, ASM_OUTPUT_BYTE, ASM_OUTPUT_FLOAT_OPERAND): + Likewise. + * m68k/hp320.h (ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_BYTE): + Likewise. + * m68k.h (ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_BYTE): + Likewise. + * m68k/m68kv4.h (ASM_OUTPUT_ASCII): Delete unused variable. + * m68k/mot3300.h (ASM_OUTPUT_BYTE): Fix format specifier warning. + * m68k/news.h (PRINT_OPERAND): Likewise. + * m68k/next.h (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT, + ASM_OUTPUT_FLOAT_OPERAND, ASM_OUTPUT_DOUBLE_OPERAND): Likewise. + * m68k/next21.h (ASM_OUTPUT_FLOAT_OPERAND): Likewise. + * m68k/plexus.h (ASM_SPEC): Insert space between macro name and + definition. + * m68k/sgs.h (ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, + ASM_OUTPUT_FLOAT, ASM_OUTPUT_ASCII, ASM_OUTPUT_FLOAT_OPERAND, + ASM_OUTPUT_DOUBLE_OPERAND): Fix format specifier warnings. + * m68k/sun3.h (ASM_OUTPUT_FLOAT_OPERAND): Likewise. + * m68k/tower-as.h (ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_DOUBLE, + ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_FLOAT, ASM_OUTPUT_BYTE, + PRINT_OPERAND): Likewise. + * m88k/m88k.h (ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_BYTE): + Likewise. + * mips/elf.h (PUT_SDB_SIZE, ASM_DECLARE_OBJECT_NAME): Likewise. + * mips/elf64.h (PUT_SDB_SIZE, ASM_DECLARE_OBJECT_NAME): Likewise. + * mips/iris5gas.h (PUT_SDB_SIZE): Likewise. + * mips/linux.h (ASM_DECLARE_OBJECT_NAME): Likewise. + * mips.c (mips_output_external_libcall): Mark parameter with + ATTRIBUTE_UNUSED. + (mips_asm_file_start): Move variable into the scope where it's + used. + * mips.h (PUT_SDB_INT_VAL, PUT_SDB_SIZE): Likewise. + * mips/netbsd.h (ASM_DECLARE_OBJECT_NAME): Likewise. + * mips/sni-gas.h (PUT_SDB_SIZE): Likewise. + * ns32k/encore.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. + * ns32k.c (print_operand): Likewise. + * pa.c (print_operand, output_div_insn): Likewise. + * pa.h (ASM_OUTPUT_MI_THUNK, ASM_GENERATE_INTERNAL_LABEL, + ASM_OUTPUT_BYTE, PRINT_OPERAND_ADDRESS): Likewise. + * pa/pa64-hpux.h (UNIQUE_SECTION): Const-ify. + * sparc/linux.h (ASM_GENERATE_INTERNAL_LABEL): Fix format + specifier warnings. + * sparc/linux64.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. + * sparc/pbd.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. + (ASM_OUTPUT_SOURCE_LINE): Don't list macro arguments in undef. + * sparc/vxsim.h (ASM_GENERATE_INTERNAL_LABEL): Fix format + specifier warnings. + * svr3.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. + + * sdbout.c (sdbout_end_epilogue): Mark parameter with + ATTRIBUTE_UNUSED. + * varasm.c (assemble_global): Likewise. + 2001-11-11 H.J. Lu * config.gcc: Add "elfos.h svr4.h" to $tm_file for Linux/mips. diff --git a/gcc/config/alpha/unicosmk.h b/gcc/config/alpha/unicosmk.h index 62ce020c212..87f9603b340 100644 --- a/gcc/config/alpha/unicosmk.h +++ b/gcc/config/alpha/unicosmk.h @@ -431,7 +431,7 @@ ssib_section () \ #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ do { long t[2]; \ REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \ - fprintf (FILE, "\t.quad ^X%x\n", t[0]); \ + fprintf (FILE, "\t.quad ^X%lx\n", t[0]); \ } while(0) #endif @@ -452,13 +452,13 @@ ssib_section () \ #define ASM_OUTPUT_FLOAT(FILE,VALUE) \ do { long t; \ REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \ - fprintf (FILE, "\t.long ^X%x\n", t & 0xffffffff);\ + fprintf (FILE, "\t.long ^X%lx\n", t & 0xffffffff);\ } while (0) #else #define ASM_OUTPUT_FLOAT(FILE,VALUE) \ do { long t; \ REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \ - fprintf (FILE, "\t.long ^X%x\n", (t >> 32) & 0xffffffff);\ + fprintf (FILE, "\t.long ^X%lx\n", (t >> 32) & 0xffffffff);\ } while(0) #endif diff --git a/gcc/config/convex/convex.h b/gcc/config/convex/convex.h index a69d9d2328a..50d5bafd54d 100644 --- a/gcc/config/convex/convex.h +++ b/gcc/config/convex/convex.h @@ -1311,7 +1311,7 @@ enum reg_class { /* This is how to output an assembler line for a numeric constant byte. */ #define ASM_OUTPUT_BYTE(FILE,VALUE) \ - fprintf (FILE, "\tds.b %#x\n", (VALUE)) + fprintf (FILE, "\tds.b %#x\n", (int)(VALUE)) /* This is how to output a string */ diff --git a/gcc/config/elfos.h b/gcc/config/elfos.h index 66b0db7e8e3..5c64afbc1a6 100644 --- a/gcc/config/elfos.h +++ b/gcc/config/elfos.h @@ -165,6 +165,7 @@ Boston, MA 02111-1307, USA. */ make sure that the location counter for the .rodata section gets pro- perly re-aligned prior to the actual beginning of the jump table. */ +#undef ALIGN_ASM_OP #define ALIGN_ASM_OP "\t.align\t" #ifndef ASM_OUTPUT_BEFORE_CASE_LABEL diff --git a/gcc/config/i386/att.h b/gcc/config/i386/att.h index a48226e58ee..39bb1799f97 100644 --- a/gcc/config/i386/att.h +++ b/gcc/config/i386/att.h @@ -91,7 +91,7 @@ do \ #undef ASM_GENERATE_INTERNAL_LABEL #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ - sprintf ((BUF), "%s%s%d", LOCAL_LABEL_PREFIX, (PREFIX), (NUMBER)) + sprintf ((BUF), "%s%s%ld", LOCAL_LABEL_PREFIX, (PREFIX), (long)(NUMBER)) /* This is how to output an internal numbered label where PREFIX is the class of label and NUM is the number within the class. */ diff --git a/gcc/config/i386/bsd.h b/gcc/config/i386/bsd.h index cba2dde1d35..6473cae88f7 100644 --- a/gcc/config/i386/bsd.h +++ b/gcc/config/i386/bsd.h @@ -96,10 +96,10 @@ Boston, MA 02111-1307, USA. */ #ifdef NO_UNDERSCORES #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ - sprintf ((BUF), "*.%s%d", (PREFIX), (NUMBER)) + sprintf ((BUF), "*.%s%ld", (PREFIX), (long)(NUMBER)) #else #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ - sprintf ((BUF), "*%s%d", (PREFIX), (NUMBER)) + sprintf ((BUF), "*%s%ld", (PREFIX), (long)(NUMBER)) #endif /* This is how to output an internal numbered label where diff --git a/gcc/config/i386/gas.h b/gcc/config/i386/gas.h index 19b28596579..4c392966244 100644 --- a/gcc/config/i386/gas.h +++ b/gcc/config/i386/gas.h @@ -150,7 +150,7 @@ Boston, MA 02111-1307, USA. */ #undef ASM_GENERATE_INTERNAL_LABEL #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ - sprintf ((BUF), ".%s%d", (PREFIX), (NUMBER)) + sprintf ((BUF), ".%s%ld", (PREFIX), (long)(NUMBER)) /* This is how to output an internal numbered label where PREFIX is the class of label and NUM is the number within the class. */ diff --git a/gcc/config/i386/i386-interix.h b/gcc/config/i386/i386-interix.h index 29f5a2241dc..f94d9c87353 100644 --- a/gcc/config/i386/i386-interix.h +++ b/gcc/config/i386/i386-interix.h @@ -350,7 +350,8 @@ while (0) stddef renaming does NOT apply to Alpha. */ -char *gen_stdcall_suffix (); +union tree_node; +const char *gen_stdcall_suffix PARAMS ((union tree_node *)); #undef ENCODE_SECTION_INFO #define ENCODE_SECTION_INFO(DECL) \ diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 7edfc283c48..be2af297930 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -2974,7 +2974,7 @@ do { long l; \ /* This is how to output an assembler line for a numeric constant byte. */ #define ASM_OUTPUT_BYTE(FILE,VALUE) \ - asm_fprintf ((FILE), "%s0x%x\n", ASM_BYTE_OP, (VALUE)) + asm_fprintf ((FILE), "%s0x%x\n", ASM_BYTE_OP, (int) (VALUE)) /* This is how to output an insn to push a register on the stack. It need not be very fast code. */ diff --git a/gcc/config/i386/i386elf.h b/gcc/config/i386/i386elf.h index 86d288883bd..352c3e17b70 100644 --- a/gcc/config/i386/i386elf.h +++ b/gcc/config/i386/i386elf.h @@ -57,7 +57,7 @@ Boston, MA 02111-1307, USA. */ do { long value; \ REAL_VALUE_TO_TARGET_SINGLE ((VALUE), value); \ if (sizeof (int) == sizeof (long)) \ - fprintf((FILE), "%s0x%x\n", ASM_LONG, value); \ + fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value); \ else \ fprintf((FILE), "%s0x%lx\n", ASM_LONG, value); \ } while (0) @@ -73,8 +73,8 @@ do { long value[2]; \ REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), value); \ if (sizeof (int) == sizeof (long)) \ { \ - fprintf((FILE), "%s0x%x\n", ASM_LONG, value[0]); \ - fprintf((FILE), "%s0x%x\n", ASM_LONG, value[1]); \ + fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[0]); \ + fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[1]); \ } \ else \ { \ @@ -90,9 +90,9 @@ do { long value[3]; \ REAL_VALUE_TO_TARGET_LONG_DOUBLE ((VALUE), value); \ if (sizeof (int) == sizeof (long)) \ { \ - fprintf((FILE), "%s0x%x\n", ASM_LONG, value[0]); \ - fprintf((FILE), "%s0x%x\n", ASM_LONG, value[1]); \ - fprintf((FILE), "%s0x%x\n", ASM_LONG, value[2]); \ + fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[0]); \ + fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[1]); \ + fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[2]); \ } \ else \ { \ diff --git a/gcc/config/i386/interix.c b/gcc/config/i386/interix.c index ed71cd45b58..8ea2c6e171f 100644 --- a/gcc/config/i386/interix.c +++ b/gcc/config/i386/interix.c @@ -31,14 +31,14 @@ Boston, MA 02111-1307, USA. */ suffix consisting of an atsign (@) followed by the number of bytes of arguments */ -char * +const char * gen_stdcall_suffix (decl) tree decl; { int total = 0; /* ??? This probably should use XSTR (XEXP (DECL_RTL (decl), 0), 0) instead of DECL_ASSEMBLER_NAME. */ - char *asmname = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); + const char *const asmname = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); char *newsym; if (TYPE_ARG_TYPES (TREE_TYPE (decl))) diff --git a/gcc/config/i386/next.h b/gcc/config/i386/next.h index d97d2dc7417..02ca452e75f 100644 --- a/gcc/config/i386/next.h +++ b/gcc/config/i386/next.h @@ -50,7 +50,7 @@ Boston, MA 02111-1307, USA. */ REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, hex); \ if (sizeof (int) == sizeof (long)) \ fprintf (FILE, "\t.long 0x%x\n\t.long 0x%x\n\t.long 0x%x\n", \ - hex[0], hex[1], hex[2]); \ + (int) hex[0], (int) hex[1], (int) hex[2]); \ else \ fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n\t.long 0x%lx\n", \ hex[0], hex[1], hex[2]); \ @@ -64,7 +64,8 @@ Boston, MA 02111-1307, USA. */ long hex[2]; \ REAL_VALUE_TO_TARGET_DOUBLE (VALUE, hex); \ if (sizeof (int) == sizeof (long)) \ - fprintf (FILE, "\t.long 0x%x\n\t.long 0x%x\n", hex[0], hex[1]); \ + fprintf (FILE, "\t.long 0x%x\n\t.long 0x%x\n", \ + (int) hex[0], (int) hex[1]); \ else \ fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n", hex[0], hex[1]); \ } while (0) @@ -79,7 +80,7 @@ Boston, MA 02111-1307, USA. */ long hex; \ REAL_VALUE_TO_TARGET_SINGLE (VALUE, hex); \ if (sizeof (int) == sizeof (long)) \ - fprintf (FILE, "\t.long 0x%x\n", hex); \ + fprintf (FILE, "\t.long 0x%x\n", (int) hex); \ else \ fprintf (FILE, "\t.long 0x%lx\n", hex); \ } while (0) @@ -143,7 +144,7 @@ Boston, MA 02111-1307, USA. */ #undef ASM_GENERATE_INTERNAL_LABEL #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ - sprintf ((BUF), "*%s%d", (PREFIX), (NUMBER)) + sprintf ((BUF), "*%s%ld", (PREFIX), (long)(NUMBER)) #undef ASM_OUTPUT_INTERNAL_LABEL #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ diff --git a/gcc/config/i386/osfrose.h b/gcc/config/i386/osfrose.h index e4996302cfe..36d6345685b 100644 --- a/gcc/config/i386/osfrose.h +++ b/gcc/config/i386/osfrose.h @@ -294,8 +294,8 @@ while (0) #undef ASM_GENERATE_INTERNAL_LABEL #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ - sprintf ((BUF), "*%s%s%d", (TARGET_UNDERSCORES) ? "" : ".", \ - (PREFIX), (NUMBER)) + sprintf ((BUF), "*%s%s%ld", (TARGET_UNDERSCORES) ? "" : ".", \ + (PREFIX), (long)(NUMBER)) /* This is how to output an internal numbered label where PREFIX is the class of label and NUM is the number within the class. */ diff --git a/gcc/config/i386/ptx4-i.h b/gcc/config/i386/ptx4-i.h index a888d818af5..edb14e38b8f 100644 --- a/gcc/config/i386/ptx4-i.h +++ b/gcc/config/i386/ptx4-i.h @@ -50,7 +50,7 @@ Boston, MA 02111-1307, USA. */ do { long value; \ REAL_VALUE_TO_TARGET_SINGLE ((VALUE), value); \ if (sizeof (int) == sizeof (long)) \ - fprintf((FILE), "%s0x%x\n", ASM_LONG, value); \ + fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value); \ else \ fprintf((FILE), "%s0x%lx\n", ASM_LONG, value); \ } while (0) @@ -66,8 +66,8 @@ do { long value[2]; \ REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), value); \ if (sizeof (int) == sizeof (long)) \ { \ - fprintf((FILE), "%s0x%x\n", ASM_LONG, value[0]); \ - fprintf((FILE), "%s0x%x\n", ASM_LONG, value[1]); \ + fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[0]); \ + fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[1]); \ } \ else \ { \ @@ -83,9 +83,9 @@ do { long value[3]; \ REAL_VALUE_TO_TARGET_LONG_DOUBLE ((VALUE), value); \ if (sizeof (int) == sizeof (long)) \ { \ - fprintf((FILE), "%s0x%x\n", ASM_LONG, value[0]); \ - fprintf((FILE), "%s0x%x\n", ASM_LONG, value[1]); \ - fprintf((FILE), "%s0x%x\n", ASM_LONG, value[2]); \ + fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[0]); \ + fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[1]); \ + fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[2]); \ } \ else \ { \ diff --git a/gcc/config/i386/sco5.h b/gcc/config/i386/sco5.h index 5dd90e39c4b..000207c8df5 100644 --- a/gcc/config/i386/sco5.h +++ b/gcc/config/i386/sco5.h @@ -232,9 +232,9 @@ do { \ #define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \ do { \ if (TARGET_ELF) \ - sprintf (LABEL, "*.%s%d", (PREFIX), (NUM)); \ + sprintf (LABEL, "*.%s%ld", (PREFIX), (long)(NUM)); \ else \ - sprintf (LABEL, ".%s%d", (PREFIX), (NUM)); \ + sprintf (LABEL, ".%s%ld", (PREFIX), (long)(NUM)); \ } while (0) #undef ASM_OUTPUT_ALIGNED_COMMON diff --git a/gcc/config/i386/sequent.h b/gcc/config/i386/sequent.h index 37906267562..cffc50ae1e2 100644 --- a/gcc/config/i386/sequent.h +++ b/gcc/config/i386/sequent.h @@ -135,7 +135,7 @@ Boston, MA 02111-1307, USA. */ #undef ASM_GENERATE_INTERNAL_LABEL #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER)\ - sprintf ((BUF), "*.%s%d", (PREFIX), (NUMBER)) + sprintf ((BUF), "*.%s%ld", (PREFIX), (long)(NUMBER)) #undef ASM_OUTPUT_INTERNAL_LABEL #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)\ diff --git a/gcc/config/i386/sun386.h b/gcc/config/i386/sun386.h index 20d48c9340c..182f83b96da 100644 --- a/gcc/config/i386/sun386.h +++ b/gcc/config/i386/sun386.h @@ -129,7 +129,7 @@ do \ This is suitable for output with `assemble_name'. */ #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ - sprintf ((BUF), "*.%s%d", (PREFIX), (NUMBER)) + sprintf ((BUF), "*.%s%ld", (PREFIX), (long)(NUMBER)) /* The prefix to add to user-visible assembler symbols. */ diff --git a/gcc/config/i386/svr3dbx.h b/gcc/config/i386/svr3dbx.h index 36c01cc3c21..b0e4237aa4a 100644 --- a/gcc/config/i386/svr3dbx.h +++ b/gcc/config/i386/svr3dbx.h @@ -33,7 +33,7 @@ Boston, MA 02111-1307, USA. */ #undef ASM_GENERATE_INTERNAL_LABEL #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ - sprintf ((BUF), "*.%s%d", (PREFIX), (NUMBER)) + sprintf ((BUF), "*.%s%ld", (PREFIX), (long)(NUMBER)) /* With the current gas, .align N aligns to an N-byte boundary. This is done to be compatible with the system assembler. diff --git a/gcc/config/m68k/3b1.h b/gcc/config/m68k/3b1.h index 31194c82309..343114128b5 100644 --- a/gcc/config/m68k/3b1.h +++ b/gcc/config/m68k/3b1.h @@ -132,14 +132,14 @@ output_file_directive ((FILE), main_input_filename) #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ do { long l[2]; \ REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \ - fprintf (FILE, "\tlong 0x%x,0x%x\n", l[0], l[1]); \ + fprintf (FILE, "\tlong 0x%lx,0x%lx\n", l[0], l[1]); \ } while (0) #undef ASM_OUTPUT_LONG_DOUBLE #define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \ do { long l[3]; \ REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l); \ - fprintf (FILE, "\tlong 0x%x,0x%x,0x%x\n", l[0], l[1], l[2]); \ + fprintf (FILE, "\tlong 0x%lx,0x%lx,0x%lx\n", l[0], l[1], l[2]); \ } while (0) /* This is how to output an assembler line defining a `float' constant. */ @@ -147,7 +147,7 @@ do { long l[3]; \ #define ASM_OUTPUT_FLOAT(FILE,VALUE) \ do { long l; \ REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ - fprintf ((FILE), "\tlong 0x%x\n", l); \ + fprintf ((FILE), "\tlong 0x%lx\n", l); \ } while (0) #define ASM_OUTPUT_ALIGN(FILE,LOG) \ @@ -348,7 +348,7 @@ do { long l; \ }} #define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \ - sprintf ((LABEL), "%s%%%d", (PREFIX), (NUM)) + sprintf ((LABEL), "%s%%%ld", (PREFIX), (long)(NUM)) #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ fprintf (FILE, "%s%%%d:\n", PREFIX, NUM) diff --git a/gcc/config/m68k/altos3068.h b/gcc/config/m68k/altos3068.h index 031509dbe35..c13e6086a03 100644 --- a/gcc/config/m68k/altos3068.h +++ b/gcc/config/m68k/altos3068.h @@ -110,7 +110,7 @@ Boston, MA 02111-1307, USA. */ long l; \ REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ if (sizeof (int) == sizeof (long)) \ - asm_fprintf ((FILE), "%I0x%x", l); \ + asm_fprintf ((FILE), "%I0x%x", (int) l); \ else \ asm_fprintf ((FILE), "%I0x%lx", l); \ } \ diff --git a/gcc/config/m68k/amix.h b/gcc/config/m68k/amix.h index d59ad0ffb98..1fbdcc3d7f3 100644 --- a/gcc/config/m68k/amix.h +++ b/gcc/config/m68k/amix.h @@ -100,7 +100,7 @@ do { \ #undef ASM_OUTPUT_ASCII #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ do { \ - register int sp = 0, lp = 0, ch; \ + register int sp = 0, ch; \ fprintf ((FILE), "%s", BYTE_ASM_OP); \ do { \ ch = (PTR)[sp]; \ @@ -137,9 +137,9 @@ do { \ #undef ASM_GENERATE_INTERNAL_LABEL #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ if (flag_pic && !strcmp(PREFIX,"LC")) \ - sprintf (LABEL, "*%s%%%d", PREFIX, NUM); \ + sprintf (LABEL, "*%s%%%ld", PREFIX, (long)(NUM)); \ else \ - sprintf (LABEL, "*%s%s%d", LOCAL_LABEL_PREFIX, PREFIX, NUM) + sprintf (LABEL, "*%s%s%ld", LOCAL_LABEL_PREFIX, PREFIX, (long)(NUM)) #undef ASM_OUTPUT_INTERNAL_LABEL #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ diff --git a/gcc/config/m68k/atari.h b/gcc/config/m68k/atari.h index e17530a913f..8e1ddff9a7e 100644 --- a/gcc/config/m68k/atari.h +++ b/gcc/config/m68k/atari.h @@ -60,7 +60,7 @@ int switch_table_difference_label_flag; #undef ASM_OUTPUT_ASCII #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ { \ - register int sp = 0, lp = 0, ch; \ + register int sp = 0, ch; \ fprintf ((FILE), "%s", BYTE_ASM_OP); \ do { \ ch = (PTR)[sp]; \ @@ -94,9 +94,9 @@ int switch_table_difference_label_flag; #undef ASM_GENERATE_INTERNAL_LABEL #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ if (flag_pic && !strcmp(PREFIX,"LC")) \ - sprintf (LABEL, "*%s%%%d", PREFIX, NUM); \ + sprintf (LABEL, "*%s%%%ld", PREFIX, (long)(NUM)); \ else \ - sprintf (LABEL, "*%s%s%d", LOCAL_LABEL_PREFIX, PREFIX, NUM) + sprintf (LABEL, "*%s%s%ld", LOCAL_LABEL_PREFIX, PREFIX, (long)(NUM)) #undef ASM_OUTPUT_INTERNAL_LABEL #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ diff --git a/gcc/config/m68k/crds.h b/gcc/config/m68k/crds.h index 896285a531f..9a34ceef22e 100644 --- a/gcc/config/m68k/crds.h +++ b/gcc/config/m68k/crds.h @@ -157,11 +157,11 @@ Boston, MA 02111-1307, USA. */ /* This is how to output an assembler line defining a `double' constant. */ -#undef ASM_OUTPUT_DOUBLE +#undef ASM_OUTPUT_DOUBLE #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ do { long l[2]; \ REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \ - fprintf (FILE, "\t.long 0x%x, 0x%x\n", l[0], l[1]); \ + fprintf (FILE, "\t.long 0x%lx, 0x%lx\n", l[0], l[1]); \ } while (0) /*unos has no .skip :-( */ @@ -300,7 +300,7 @@ do { int i; \ ASM_OUTPUT_FLOAT_OPERAND (CODE, FILE, r); \ else \ { REAL_VALUE_TO_TARGET_SINGLE (r, l); \ - fprintf (FILE, "$0x%x", l); } } \ + fprintf (FILE, "$0x%lx", l); } } \ else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == DFmode) \ { REAL_VALUE_TYPE r; \ REAL_VALUE_FROM_CONST_DOUBLE (r, X); \ diff --git a/gcc/config/m68k/dpx2.h b/gcc/config/m68k/dpx2.h index 84f431df8f7..27aa342cb50 100644 --- a/gcc/config/m68k/dpx2.h +++ b/gcc/config/m68k/dpx2.h @@ -279,7 +279,7 @@ Boston, MA 02111-1307, USA. */ do { long l[3]; \ REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l); \ if (sizeof (int) == sizeof (long)) \ - fprintf (FILE, "\tdc.l $%x,$%x,$%x\n", l[0], l[1], l[2]); \ + fprintf (FILE, "\tdc.l $%x,$%x,$%x\n", (int)l[0], (int)l[1], (int)l[2]); \ else \ fprintf (FILE, "\tdc.l $%lx,$%lx,$%lx\n", l[0], l[1], l[2]); \ } while (0) @@ -295,7 +295,7 @@ do { long l[3]; \ #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ do { long l[2]; \ REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \ - fprintf (FILE, "\tdc.l $%x,$%x\n", l[0], l[1]); \ + fprintf (FILE, "\tdc.l $%lx,$%lx\n", l[0], l[1]); \ } while (0) @@ -305,7 +305,7 @@ do { long l[2]; \ do { long l; \ REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ if (sizeof (int) == sizeof (long)) \ - fprintf (FILE, "\tdc.l $%x\n", l); \ + fprintf (FILE, "\tdc.l $%x\n", (int) l); \ else \ fprintf (FILE, "\tdc.l $%lx\n", l); \ } while (0) @@ -333,7 +333,7 @@ do { long l; \ /* This is how to output an assembler line for a numeric constant byte. */ #undef ASM_OUTPUT_BYTE #define ASM_OUTPUT_BYTE(FILE,VALUE) \ - fprintf (FILE, "\tdc.b $%x\n", (VALUE)) + fprintf (FILE, "\tdc.b $%x\n", (int)(VALUE)) /* This is how to output an element of a case-vector that is absolute. (The 68000 does not use such vectors, @@ -367,7 +367,7 @@ do { long l; \ long l; \ REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ if (sizeof (int) == sizeof (long)) \ - asm_fprintf ((FILE), "%I$%x", l); \ + asm_fprintf ((FILE), "%I$%x", (int) l); \ else \ asm_fprintf ((FILE), "%I$%lx", l); \ } \ diff --git a/gcc/config/m68k/hp320.h b/gcc/config/m68k/hp320.h index 6bb86d3c559..03617b43074 100644 --- a/gcc/config/m68k/hp320.h +++ b/gcc/config/m68k/hp320.h @@ -283,7 +283,7 @@ do{ if (PREFIX[0] == 'L' && PREFIX[1] == 'I') \ #define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \ do { long l[3]; \ REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l); \ - fprintf (FILE, "\tlong 0x%x,0x%x,0x%x\n", l[0], l[1], l[2]); \ + fprintf (FILE, "\tlong 0x%lx,0x%lx,0x%lx\n", l[0], l[1], l[2]); \ } while (0) /* This is how to output an assembler line defining an `int' constant. */ @@ -308,7 +308,7 @@ do { long l[3]; \ /* This is how to output an assembler line for a numeric constant byte. */ #define ASM_OUTPUT_BYTE(FILE,VALUE) \ - fprintf (FILE, "\tbyte 0x%x\n", (VALUE)) + fprintf (FILE, "\tbyte 0x%x\n", (int)(VALUE)) #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ fprintf (FILE, "\tlong L%d\n", VALUE) diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h index fad64082b57..b0e0e25a9cd 100644 --- a/gcc/config/m68k/m68k.h +++ b/gcc/config/m68k/m68k.h @@ -1952,7 +1952,7 @@ __transfer_from_trampoline () \ This is suitable for output with `assemble_name'. */ #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ - sprintf (LABEL, "*%s%s%d", LOCAL_LABEL_PREFIX, PREFIX, NUM) + sprintf (LABEL, "*%s%s%ld", LOCAL_LABEL_PREFIX, PREFIX, (long)(NUM)) /* This is how to output a `long double' extended real constant. */ @@ -2000,7 +2000,7 @@ do { long l; \ /* This is how to output an assembler line for a numeric constant byte. */ #define ASM_OUTPUT_BYTE(FILE,VALUE) \ - fprintf (FILE, "\t.byte 0x%x\n", (VALUE)) + fprintf (FILE, "\t.byte 0x%x\n", (int)(VALUE)) /* This is how to output an insn to push a register on the stack. It need not be very fast code. */ diff --git a/gcc/config/m68k/m68kelf.h b/gcc/config/m68k/m68kelf.h index c75203e6b14..060b13bfc50 100644 --- a/gcc/config/m68k/m68kelf.h +++ b/gcc/config/m68k/m68kelf.h @@ -180,7 +180,7 @@ Boston, MA 02111-1307, USA. */ #undef ASM_OUTPUT_ASCII #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ do { \ - register int sp = 0, lp = 0, ch; \ + register int sp = 0, ch; \ fprintf ((FILE), "%s", BYTE_ASM_OP); \ do { \ ch = (PTR)[sp]; \ diff --git a/gcc/config/m68k/m68kv4.h b/gcc/config/m68k/m68kv4.h index e10b6e5e506..4d26e422731 100644 --- a/gcc/config/m68k/m68kv4.h +++ b/gcc/config/m68k/m68kv4.h @@ -215,7 +215,7 @@ do { \ #undef ASM_OUTPUT_ASCII #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ do { \ - register int sp = 0, lp = 0, ch; \ + register int sp = 0, ch; \ fprintf ((FILE), "%s", BYTE_ASM_OP); \ do { \ ch = (PTR)[sp]; \ diff --git a/gcc/config/m68k/mot3300.h b/gcc/config/m68k/mot3300.h index be2e0570506..4b96a50ce4c 100644 --- a/gcc/config/m68k/mot3300.h +++ b/gcc/config/m68k/mot3300.h @@ -365,7 +365,7 @@ do { long l; \ #undef ASM_OUTPUT_BYTE #define ASM_OUTPUT_BYTE(FILE,VALUE) \ - fprintf (FILE, "\t%s 0x%x\n", ASM_BYTE, (VALUE)) + fprintf (FILE, "\t%s 0x%x\n", ASM_BYTE, (int)(VALUE)) /* This is how to output an assembler line that says to advance the location counter diff --git a/gcc/config/m68k/news.h b/gcc/config/m68k/news.h index edb05c00479..8e556439b0f 100644 --- a/gcc/config/m68k/news.h +++ b/gcc/config/m68k/news.h @@ -285,7 +285,7 @@ do { char dstr[30]; \ else \ { long l; \ REAL_VALUE_TO_TARGET_SINGLE (r, l); \ - fprintf (FILE, "#0x%x", l); \ + fprintf (FILE, "#0x%lx", l); \ }} \ else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == XFmode) \ { REAL_VALUE_TYPE r; \ diff --git a/gcc/config/m68k/next.h b/gcc/config/m68k/next.h index 501b1117e8a..1e2d10d527e 100644 --- a/gcc/config/m68k/next.h +++ b/gcc/config/m68k/next.h @@ -47,7 +47,7 @@ Boston, MA 02111-1307, USA. */ do { \ long hex[2]; \ REAL_VALUE_TO_TARGET_DOUBLE (VALUE, hex); \ - fprintf (FILE, "\t.long 0x%x\n\t.long 0x%x\n", hex[0], hex[1]); \ + fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n", hex[0], hex[1]); \ } while (0) #else #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ @@ -74,7 +74,7 @@ Boston, MA 02111-1307, USA. */ do { \ long hex; \ REAL_VALUE_TO_TARGET_SINGLE (VALUE, hex); \ - fprintf (FILE, "\t.long 0x%x\n", hex); \ + fprintf (FILE, "\t.long 0x%lx\n", hex); \ } while (0) #else #define ASM_OUTPUT_FLOAT(FILE,VALUE) \ @@ -99,7 +99,7 @@ Boston, MA 02111-1307, USA. */ do { \ long hex; \ REAL_VALUE_TO_TARGET_SINGLE (VALUE, hex); \ - fprintf (FILE, "#0%c%x", (CODE) == 'f' ? 'b' : 'x', hex); \ + fprintf (FILE, "#0%c%lx", (CODE) == 'f' ? 'b' : 'x', hex); \ } while (0) #else #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \ @@ -109,7 +109,7 @@ Boston, MA 02111-1307, USA. */ long l; \ REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ if (sizeof (int) == sizeof (long)) \ - asm_fprintf ((FILE), "%I0x%x", l); \ + asm_fprintf ((FILE), "%I0x%x", (int) l); \ else \ asm_fprintf ((FILE), "%I0x%lx", l); \ } \ @@ -134,7 +134,7 @@ Boston, MA 02111-1307, USA. */ do { \ long hex[2]; \ REAL_VALUE_TO_TARGET_DOUBLE (VALUE, hex); \ - fprintf (FILE, "#0b%x%08x", hex[0], hex[1]); \ + fprintf (FILE, "#0b%lx%08lx", hex[0], hex[1]); \ } while (0) #else #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \ diff --git a/gcc/config/m68k/next21.h b/gcc/config/m68k/next21.h index 960bcf351e9..5040aa6a92f 100644 --- a/gcc/config/m68k/next21.h +++ b/gcc/config/m68k/next21.h @@ -69,7 +69,7 @@ Boston, MA 02111-1307, USA. */ long l; \ REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ if (sizeof (int) == sizeof (long)) \ - asm_fprintf ((FILE), "%I0x%x", l); \ + asm_fprintf ((FILE), "%I0x%x", (int) l); \ else \ asm_fprintf ((FILE), "%I0x%lx", l); \ } \ diff --git a/gcc/config/m68k/plexus.h b/gcc/config/m68k/plexus.h index 765702c56a0..0ad980b15e1 100644 --- a/gcc/config/m68k/plexus.h +++ b/gcc/config/m68k/plexus.h @@ -46,7 +46,7 @@ Boston, MA 02111-1307, USA. */ #define CPP_PREDEFINES "-Dm68 -Dunix -Dplexus -Asystem=unix -Acpu=m68k -Amachine=m68k" #if TARGET_DEFAULT & MASK_68020 -#define ASM_SPEC\ +#define ASM_SPEC \ "%{m68000:-mc68000}%{mc68000:-mc68000}%{!mc68000:%{!m68000:-mc68020}}" #undef STRICT_ALIGNMENT #define STRICT_ALIGNMENT 0 diff --git a/gcc/config/m68k/sgs.h b/gcc/config/m68k/sgs.h index 2901246df82..0c5eb596d1f 100644 --- a/gcc/config/m68k/sgs.h +++ b/gcc/config/m68k/sgs.h @@ -115,7 +115,7 @@ Boston, MA 02111-1307, USA. */ #define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \ do { long l[3]; \ REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l); \ - fprintf ((FILE), "%s0x%x,0x%x,0x%x\n", LONG_ASM_OP, \ + fprintf ((FILE), "%s0x%lx,0x%lx,0x%lx\n", LONG_ASM_OP, \ l[0], l[1], l[2]); \ } while (0) @@ -125,7 +125,7 @@ do { long l[3]; \ #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ do { long l[2]; \ REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \ - fprintf ((FILE), "%s0x%x,0x%x\n", LONG_ASM_OP, \ + fprintf ((FILE), "%s0x%lx,0x%lx\n", LONG_ASM_OP, \ l[0], l[1]); \ } while (0) @@ -135,7 +135,7 @@ do { long l[2]; \ #define ASM_OUTPUT_FLOAT(FILE,VALUE) \ do { long l; \ REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ - fprintf ((FILE), "%s0x%x\n", LONG_ASM_OP, l); \ + fprintf ((FILE), "%s0x%lx\n", LONG_ASM_OP, l); \ } while (0) /* This is how to output an assembler line that says to advance the @@ -157,7 +157,7 @@ do { long l; \ #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ do { \ - register int sp = 0, lp = 0, ch; \ + register int sp = 0, ch; \ fprintf ((FILE), "%s", BYTE_ASM_OP); \ do { \ ch = (PTR)[sp]; \ @@ -213,14 +213,14 @@ do { \ #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \ do { long l; \ REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ - asm_fprintf ((FILE), "%I0x%x", l); \ + asm_fprintf ((FILE), "%I0x%lx", l); \ } while (0) #undef ASM_OUTPUT_DOUBLE_OPERAND #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \ do { long l[2]; \ REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \ - asm_fprintf ((FILE), "%I0x%x%08x", l[0], l[1]); \ + asm_fprintf ((FILE), "%I0x%lx%08lx", l[0], l[1]);\ } while (0) /* How to output a block of SIZE zero bytes. Note that the `space' pseudo, diff --git a/gcc/config/m68k/sun2o4.h b/gcc/config/m68k/sun2o4.h index da722cfa6ec..4dd393baccf 100644 --- a/gcc/config/m68k/sun2o4.h +++ b/gcc/config/m68k/sun2o4.h @@ -146,7 +146,7 @@ Boston, MA 02111-1307, USA. */ long l; \ REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ if (sizeof (int) == sizeof (long)) \ - asm_fprintf ((FILE), "%I0x%x", l); \ + asm_fprintf ((FILE), "%I0x%x", (int) l); \ else \ asm_fprintf ((FILE), "%I0x%lx", l); \ } \ diff --git a/gcc/config/m68k/sun3.h b/gcc/config/m68k/sun3.h index cecbd635c1e..e8265630dff 100644 --- a/gcc/config/m68k/sun3.h +++ b/gcc/config/m68k/sun3.h @@ -242,7 +242,7 @@ Boston, MA 02111-1307, USA. */ long l; \ REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ if (sizeof (int) == sizeof (long)) \ - asm_fprintf ((FILE), "%I0x%x", l); \ + asm_fprintf ((FILE), "%I0x%x", (int) l); \ else \ asm_fprintf ((FILE), "%I0x%lx", l); \ } \ diff --git a/gcc/config/m68k/tower-as.h b/gcc/config/m68k/tower-as.h index 46797384893..6dd60dc5ee5 100644 --- a/gcc/config/m68k/tower-as.h +++ b/gcc/config/m68k/tower-as.h @@ -244,7 +244,7 @@ Boston, MA 02111-1307, USA. */ #undef ASM_GENERATE_INTERNAL_LABEL #define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \ - sprintf ((LABEL), "%s%%%d", (PREFIX), (NUM)) + sprintf ((LABEL), "%s%%%ld", (PREFIX), (long)(NUM)) #undef ASM_OUTPUT_INTERNAL_LABEL #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ @@ -259,21 +259,21 @@ Boston, MA 02111-1307, USA. */ #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ do { long l[2]; \ REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \ - fprintf (FILE, "\tlong 0x%x,0x%x\n", l[0], l[1]); \ + fprintf (FILE, "\tlong 0x%lx,0x%lx\n", l[0], l[1]); \ } while (0) #undef ASM_OUTPUT_LONG_DOUBLE #define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \ do { long l[3]; \ REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l); \ - fprintf (FILE, "\tlong 0x%x,0x%x,0x%x\n", l[0], l[1], l[2]); \ + fprintf (FILE, "\tlong 0x%lx,0x%lx,0x%lx\n", l[0], l[1], l[2]); \ } while (0) #undef ASM_OUTPUT_FLOAT #define ASM_OUTPUT_FLOAT(FILE,VALUE) \ do { long l; \ REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ - fprintf ((FILE), "\tlong 0x%x\n", l); \ + fprintf ((FILE), "\tlong 0x%lx\n", l); \ } while (0) /* This is how to output an assembler line defining an `int' constant. */ @@ -302,7 +302,7 @@ do { long l; \ #undef ASM_OUTPUT_BYTE #define ASM_OUTPUT_BYTE(FILE,VALUE) \ - fprintf (FILE, "\tbyte 0x%x\n", (VALUE)) + fprintf (FILE, "\tbyte 0x%x\n", (int)(VALUE)) #undef ASM_OUTPUT_ADDR_VEC_ELT #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ @@ -364,7 +364,7 @@ do { long l; \ { REAL_VALUE_TYPE r; long l; \ REAL_VALUE_FROM_CONST_DOUBLE (r, X); \ REAL_VALUE_TO_TARGET_SINGLE (r, l); \ - fprintf (FILE, "&0x%x", l); } \ + fprintf (FILE, "&0x%lx", l); } \ else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == DFmode) \ { REAL_VALUE_TYPE r; int i[2]; \ REAL_VALUE_FROM_CONST_DOUBLE (r, X); \ diff --git a/gcc/config/m88k/m88k.h b/gcc/config/m88k/m88k.h index def27434ab1..cee7096bc9d 100644 --- a/gcc/config/m88k/m88k.h +++ b/gcc/config/m88k/m88k.h @@ -2005,7 +2005,7 @@ do { \ #undef ASM_GENERATE_INTERNAL_LABEL #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ - sprintf (LABEL, TARGET_SVR4 ? "*.%s%d" : "*@%s%d", PREFIX, NUM) + sprintf (LABEL, TARGET_SVR4 ? "*.%s%ld" : "*@%s%ld", PREFIX, (long)(NUM)) /* Internal macro to get a single precision floating point value into an int, so we can print its value in hex. */ @@ -2079,7 +2079,7 @@ do { \ /* This is how to output an assembler line for a numeric constant byte. */ #define ASM_OUTPUT_BYTE(FILE,VALUE) \ - fprintf (FILE, "%s0x%x\n", CHAR_ASM_OP, (VALUE)) + fprintf (FILE, "%s0x%x\n", CHAR_ASM_OP, (int)(VALUE)) /* The single-byte pseudo-op is the default. Override svr[34].h. */ #undef ASM_BYTE_OP diff --git a/gcc/config/mips/elf.h b/gcc/config/mips/elf.h index f07b5a72d20..5add2f12d60 100644 --- a/gcc/config/mips/elf.h +++ b/gcc/config/mips/elf.h @@ -38,7 +38,9 @@ Boston, MA 02111-1307, USA. */ #define PUT_SDB_SIZE(a) \ do { \ extern FILE *asm_out_text_file; \ - fprintf (asm_out_text_file, "\t.esize\t%d;", (a)); \ + fprintf (asm_out_text_file, "\t.esize\t"); \ + fprintf (asm_out_text_file, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT) (a)); \ + fprintf (asm_out_text_file, ";"); \ } while (0) #undef PUT_SDB_TYPE @@ -151,7 +153,10 @@ do { \ size_directive_output = 1; \ fprintf (FILE, "%s", SIZE_ASM_OP); \ assemble_name (FILE, NAME); \ - fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ + fprintf (FILE, ","); \ + fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \ + int_size_in_bytes (TREE_TYPE (DECL))); \ + fprintf (FILE, "\n"); \ } \ mips_declare_object (FILE, NAME, "", ":\n", 0); \ } while (0) diff --git a/gcc/config/mips/elf64.h b/gcc/config/mips/elf64.h index 2f520282bb6..130dbe747bc 100644 --- a/gcc/config/mips/elf64.h +++ b/gcc/config/mips/elf64.h @@ -66,7 +66,9 @@ Boston, MA 02111-1307, USA. */ #define PUT_SDB_SIZE(a) \ do { \ extern FILE *asm_out_text_file; \ - fprintf (asm_out_text_file, "\t.esize\t%d;", (a)); \ + fprintf (asm_out_text_file, "\t.esize\t"); \ + fprintf (asm_out_text_file, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT) (a)); \ + fprintf (asm_out_text_file, ";"); \ } while (0) #undef PUT_SDB_TYPE @@ -133,7 +135,10 @@ do { \ size_directive_output = 1; \ fprintf (FILE, "%s", SIZE_ASM_OP); \ assemble_name (FILE, NAME); \ - fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ + fprintf (FILE, ","); \ + fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \ + int_size_in_bytes (TREE_TYPE (DECL))); \ + fprintf (FILE, "\n"); \ } \ mips_declare_object (FILE, NAME, "", ":\n", 0); \ } while (0) diff --git a/gcc/config/mips/iris5gas.h b/gcc/config/mips/iris5gas.h index 84922c1c163..c6454c223b5 100644 --- a/gcc/config/mips/iris5gas.h +++ b/gcc/config/mips/iris5gas.h @@ -23,7 +23,9 @@ #define PUT_SDB_SIZE(a) \ do { \ extern FILE *asm_out_text_file; \ - fprintf (asm_out_text_file, "\t.esize\t%d;", (a)); \ + fprintf (asm_out_text_file, "\t.esize\t"); \ + fprintf (asm_out_text_file, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT) (a)); \ + fprintf (asm_out_text_file, ";"); \ } while (0) #undef PUT_SDB_TYPE diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h index 6caaf760ecd..b51ee2b3da2 100644 --- a/gcc/config/mips/linux.h +++ b/gcc/config/mips/linux.h @@ -84,8 +84,10 @@ do { \ size_directive_output = 1; \ fprintf (FILE, "%s", SIZE_ASM_OP); \ assemble_name (FILE, NAME); \ - fprintf (FILE, ",%d\n", \ + fprintf (FILE, ","); \ + fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \ int_size_in_bytes (TREE_TYPE (DECL))); \ + fprintf (FILE, "\n"); \ } \ mips_declare_object (FILE, NAME, "", ":\n", 0); \ } while (0) diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index cab2aa1521e..dedad2eac2c 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -5852,7 +5852,7 @@ mips_output_external (file, decl, name) #ifdef ASM_OUTPUT_UNDEF_FUNCTION int mips_output_external_libcall (file, name) - FILE *file; + FILE *file ATTRIBUTE_UNUSED; const char *name; { register struct extern_list *p; @@ -6090,8 +6090,6 @@ void mips_asm_file_start (stream) FILE *stream; { - const char * abi_string = NULL; - ASM_OUTPUT_SOURCE_FILENAME (stream, main_input_filename); /* Versions of the MIPS assembler before 2.20 generate errors if a branch @@ -6111,6 +6109,7 @@ mips_asm_file_start (stream) bits. GDB needs this information in order to be able to correctly debug these binaries. See the function mips_gdbarch_init() in gdb/mips-tdep.c. */ + const char * abi_string = NULL; switch (mips_abi) { diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 565e6b6be81..2a6dd441157 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -1275,7 +1275,9 @@ do { \ #define PUT_SDB_INT_VAL(a) \ do { \ extern FILE *asm_out_text_file; \ - fprintf (asm_out_text_file, "\t.val\t%d;", (a)); \ + fprintf (asm_out_text_file, "\t.val\t"); \ + fprintf (asm_out_text_file, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT)(a)); \ + fprintf (asm_out_text_file, ";"); \ } while (0) #define PUT_SDB_VAL(a) \ @@ -1317,7 +1319,9 @@ do { \ #define PUT_SDB_SIZE(a) \ do { \ extern FILE *asm_out_text_file; \ - fprintf (asm_out_text_file, "\t.size\t%d;", (a)); \ + fprintf (asm_out_text_file, "\t.size\t"); \ + fprintf (asm_out_text_file, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT)(a)); \ + fprintf (asm_out_text_file, ";"); \ } while (0) #define PUT_SDB_DIM(a) \ diff --git a/gcc/config/mips/netbsd.h b/gcc/config/mips/netbsd.h index 5d34ba2eb1d..09229f149b3 100644 --- a/gcc/config/mips/netbsd.h +++ b/gcc/config/mips/netbsd.h @@ -152,7 +152,10 @@ Boston, MA 02111-1307, USA. */ size_directive_output = 1; \ fprintf (FILE, "%s", SIZE_ASM_OP); \ assemble_name (FILE, NAME); \ - fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ + fprintf (FILE, ","); \ + fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \ + int_size_in_bytes (TREE_TYPE (DECL))); \ + fprintf (FILE, "\n"); \ } \ ASM_OUTPUT_LABEL(FILE, NAME); \ } while (0) diff --git a/gcc/config/mips/sni-gas.h b/gcc/config/mips/sni-gas.h index 5b3699820f3..e79c074405f 100644 --- a/gcc/config/mips/sni-gas.h +++ b/gcc/config/mips/sni-gas.h @@ -11,10 +11,12 @@ avoid conflicting with ELF directives. These are only recognized by gas, anyhow, not the native assembler. */ #undef PUT_SDB_SIZE -#define PUT_SDB_SIZE(a) \ +#define PUT_SDB_SIZE(a) \ do { \ extern FILE *asm_out_text_file; \ - fprintf (asm_out_text_file, "\t.esize\t%d;", (a)); \ + fprintf (asm_out_text_file, "\t.esize\t"); \ + fprintf (asm_out_text_file, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT) (a)); \ + fprintf (asm_out_text_file, ";"); \ } while (0) #undef PUT_SDB_TYPE diff --git a/gcc/config/ns32k/encore.h b/gcc/config/ns32k/encore.h index e1337df1d3f..be86c6cbdfc 100644 --- a/gcc/config/ns32k/encore.h +++ b/gcc/config/ns32k/encore.h @@ -87,7 +87,7 @@ output_file_directive ((FILE), main_input_filename) */ #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ - sprintf (LABEL, "*.%s%d", PREFIX, NUM) + sprintf (LABEL, "*.%s%ld", PREFIX, (long)(NUM)) #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ fprintf (FILE, ".%s%d:\n", PREFIX, NUM) #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ diff --git a/gcc/config/ns32k/ns32k.c b/gcc/config/ns32k/ns32k.c index 7d923c83c60..264245e3c2a 100644 --- a/gcc/config/ns32k/ns32k.c +++ b/gcc/config/ns32k/ns32k.c @@ -1145,7 +1145,7 @@ print_operand (file, x, code) { union { float f; long l; } uu; uu.f = u.d; - fprintf (file, "0Fx%08x", uu.l); + fprintf (file, "0Fx%08lx", uu.l); } #else fprintf (file, "0f%.20e", u.d); diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 4a7e7dce349..4f592c88a3c 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -4218,21 +4218,21 @@ print_operand (file, x, code) case 'k': if (GET_CODE (x) == CONST_INT) { - fprintf (file, "%d", ~INTVAL (x)); + fprintf (file, HOST_WIDE_INT_PRINT_DEC, ~INTVAL (x)); return; } abort (); case 'Q': if (GET_CODE (x) == CONST_INT) { - fprintf (file, "%d", 64 - (INTVAL (x) & 63)); + fprintf (file, HOST_WIDE_INT_PRINT_DEC, 64 - (INTVAL (x) & 63)); return; } abort (); case 'L': if (GET_CODE (x) == CONST_INT) { - fprintf (file, "%d", 32 - (INTVAL (x) & 31)); + fprintf (file, HOST_WIDE_INT_PRINT_DEC, 32 - (INTVAL (x) & 31)); return; } abort (); @@ -4246,14 +4246,14 @@ print_operand (file, x, code) case 'p': if (GET_CODE (x) == CONST_INT) { - fprintf (file, "%d", 63 - (INTVAL (x) & 63)); + fprintf (file, HOST_WIDE_INT_PRINT_DEC, 63 - (INTVAL (x) & 63)); return; } abort (); case 'P': if (GET_CODE (x) == CONST_INT) { - fprintf (file, "%d", 31 - (INTVAL (x) & 31)); + fprintf (file, HOST_WIDE_INT_PRINT_DEC, 31 - (INTVAL (x) & 31)); return; } abort (); @@ -4595,13 +4595,15 @@ output_div_insn (operands, unsignedp, insn) } if (unsignedp) { - sprintf (buf, "$$divU_%d", INTVAL (operands[0])); + sprintf (buf, "$$divU_"); + sprintf (buf + 7, HOST_WIDE_INT_PRINT_DEC, INTVAL (operands[0])); return output_millicode_call (insn, gen_rtx_SYMBOL_REF (SImode, buf)); } else { - sprintf (buf, "$$divI_%d", INTVAL (operands[0])); + sprintf (buf, "$$divI_"); + sprintf (buf + 7, HOST_WIDE_INT_PRINT_DEC, INTVAL (operands[0])); return output_millicode_call (insn, gen_rtx_SYMBOL_REF (SImode, buf)); } diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 7abded2b749..22542f956a0 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -865,10 +865,19 @@ extern enum cmp_type hppa_branch_type; STRIP_NAME_ENCODING (target_name, target_name); \ pa_output_function_prologue (FILE, 0); \ if (VAL_14_BITS_P (DELTA)) \ - fprintf (FILE, "\tb %s\n\tldo %d(%%r26),%%r26\n", target_name, DELTA); \ + { \ + fprintf (FILE, "\tb %s\n\tldo ", target_name); \ + fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, DELTA); \ + fprintf (FILE, "(%%r26),%%r26\n"); \ + } \ else \ - fprintf (FILE, "\taddil L%%%d,%%r26\n\tb %s\n\tldo R%%%d(%%r1),%%r26\n", \ - DELTA, target_name, DELTA); \ + { \ + fprintf (FILE, "\taddil L%%"); \ + fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, DELTA); \ + fprintf (FILE, ",%%r26\n\tb %s\n\tldo R%%", target_name); \ + fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, DELTA); \ + fprintf (FILE, "(%%r1),%%r26\n"); \ + } \ fprintf (FILE, "\n\t.EXIT\n\t.PROCEND\n"); \ } @@ -1724,7 +1733,7 @@ while (0) This is suitable for output with `assemble_name'. */ #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ - sprintf (LABEL, "*%c$%s%04d", (PREFIX)[0], (PREFIX) + 1, NUM) + sprintf (LABEL, "*%c$%s%04ld", (PREFIX)[0], (PREFIX) + 1, (long)(NUM)) /* This is how to output an assembler line defining a `double' constant. */ @@ -1770,7 +1779,7 @@ while (0) /* This is how to output an assembler line for a numeric constant byte. */ #define ASM_OUTPUT_BYTE(FILE,VALUE) \ - fprintf (FILE, "\t.byte 0x%x\n", (VALUE)) + fprintf (FILE, "\t.byte 0x%x\n", (int)(VALUE)) /* C string constants giving the pseudo-op to use for a sequence of 2, 4, and 8 byte unaligned constants. dwarf2out.c needs these. */ @@ -1912,7 +1921,8 @@ while (0) fputs (")", FILE); \ break; \ case CONST_INT: \ - fprintf (FILE, "%d(%%r0)", INTVAL (addr)); \ + fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, INTVAL (addr)); \ + fprintf (FILE, "(%%r0)"); \ break; \ default: \ output_addr_const (FILE, addr); \ diff --git a/gcc/config/pa/pa64-hpux.h b/gcc/config/pa/pa64-hpux.h index 2df1615dd54..2da2023e039 100644 --- a/gcc/config/pa/pa64-hpux.h +++ b/gcc/config/pa/pa64-hpux.h @@ -152,9 +152,9 @@ const_section () \ #define UNIQUE_SECTION(DECL,RELOC) \ do { \ int len; \ - char *name, *string, *prefix; \ - \ - name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL)); \ + char *string; \ + const char *prefix, \ + *const name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL));\ \ if (! DECL_ONE_ONLY (DECL)) \ { \ diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h index 1dd341a082e..78fcda5f6fc 100644 --- a/gcc/config/sparc/linux.h +++ b/gcc/config/sparc/linux.h @@ -227,7 +227,7 @@ do { \ #undef ASM_GENERATE_INTERNAL_LABEL #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ - sprintf (LABEL, "*.L%s%d", PREFIX, NUM) + sprintf (LABEL, "*.L%s%ld", PREFIX, (long)(NUM)) /* Define for support of TFmode long double and REAL_ARITHMETIC. diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h index d227081dc24..a15f8710b12 100644 --- a/gcc/config/sparc/linux64.h +++ b/gcc/config/sparc/linux64.h @@ -353,7 +353,7 @@ do { \ #undef ASM_GENERATE_INTERNAL_LABEL #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ - sprintf (LABEL, "*.L%s%d", PREFIX, NUM) + sprintf (LABEL, "*.L%s%ld", PREFIX, (long)(NUM)) /* Define the names of various pseudo-ops used by the Sparc/svr4 assembler. ??? If ints are 64 bits then UNALIGNED_INT_ASM_OP (defined elsewhere) is diff --git a/gcc/config/sparc/pbd.h b/gcc/config/sparc/pbd.h index db6075ea395..bf61741318d 100644 --- a/gcc/config/sparc/pbd.h +++ b/gcc/config/sparc/pbd.h @@ -120,7 +120,7 @@ Boston, MA 02111-1307, USA. */ #undef ASM_GENERATE_INTERNAL_LABEL #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ - sprintf (LABEL, "*.%s%d", PREFIX, NUM) + sprintf (LABEL, "*.%s%ld", PREFIX, (long)(NUM)) /* This is how to output an internal numbered label where @@ -146,7 +146,7 @@ Boston, MA 02111-1307, USA. */ /* This is needed for SunOS 4.0, and should not hurt for 3.2 versions either. */ -#undef ASM_OUTPUT_SOURCE_LINE(file, line) +#undef ASM_OUTPUT_SOURCE_LINE #define ASM_OUTPUT_SOURCE_LINE(file, line) \ { static int sym_lineno = 1; \ fprintf (file, ".stabn 68,0,%d,.LM%d\n.LM%d:\n", \ diff --git a/gcc/config/sparc/vxsim.h b/gcc/config/sparc/vxsim.h index d6768a91cda..9573dbe1312 100644 --- a/gcc/config/sparc/vxsim.h +++ b/gcc/config/sparc/vxsim.h @@ -90,7 +90,7 @@ do { \ #undef ASM_GENERATE_INTERNAL_LABEL #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ - sprintf (LABEL, "*.L%s%d", PREFIX, NUM) + sprintf (LABEL, "*.L%s%ld", PREFIX, (long)(NUM)) diff --git a/gcc/config/svr3.h b/gcc/config/svr3.h index 57f3ee333ed..b1b9eceabfb 100644 --- a/gcc/config/svr3.h +++ b/gcc/config/svr3.h @@ -187,7 +187,7 @@ Boston, MA 02111-1307, USA. #undef ASM_GENERATE_INTERNAL_LABEL #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ - sprintf (LABEL, "*%s%s%d", LOCAL_LABEL_PREFIX, PREFIX, NUM) + sprintf (LABEL, "*%s%s%ld", LOCAL_LABEL_PREFIX, PREFIX, (long)(NUM)) /* We want local labels to start with period if made with asm_fprintf. */ #undef LOCAL_LABEL_PREFIX diff --git a/gcc/sdbout.c b/gcc/sdbout.c index 4d93a9934b3..8a6ea31ab79 100644 --- a/gcc/sdbout.c +++ b/gcc/sdbout.c @@ -1679,7 +1679,7 @@ sdbout_end_function (line) static void sdbout_end_epilogue () { - const char *const name + const char *const name ATTRIBUTE_UNUSED = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl)); #ifdef PUT_SDB_EPILOGUE_END diff --git a/gcc/varasm.c b/gcc/varasm.c index 064a6caa3f1..cb1cd16ff43 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -1805,7 +1805,7 @@ assemble_external_libcall (fun) void assemble_global (name) - const char *name; + const char *name ATTRIBUTE_UNUSED; { ASM_GLOBALIZE_LABEL (asm_out_file, name); } -- 2.30.2