This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
warning patch for gcc/config files
- To: egcs-patches at cygnus dot com
- Subject: warning patch for gcc/config files
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Sun, 18 Oct 1998 00:30:43 -0400 (EDT)
This patch addresses warnings derived from files in gcc/config/.
Okay to install?
--Kaveh
Fri Oct 16 21:04:01 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* alpha.c (override_options): Use ISDIGIT(), not isdigit(). Cast
the argument to (unsigned char).
* alpha.h (EXTRA_SPECS): Add missing initializers.
(ASM_GENERATE_INTERNAL_LABEL): Ensure the argument matches the
format specifier.
* mips.h (EXTRA_SPECS): Add missing initializers.
* rs6000.h (EXTRA_SPECS): Add missing initializers.
(optimization_options): Provide a prototype.
(Pmode): Cast definition to (enum machine_mode).
* sparc.h (EXTRA_SPECS): Add missing initializers.
(Pmode): Cast definition to (enum machine_mode).
(sparc_defer_case_vector): Provide a prototype.
* svr4.h (ASM_OUTPUT_ASCII): Cast STRING_LIMIT to (long) when
comparing it to the result of a pointer subtraction.
diff -rup orig/egcs-CVS19981015/gcc/config/alpha/alpha.c egcs-CVS19981015/gcc/config/alpha/alpha.c
--- orig/egcs-CVS19981015/gcc/config/alpha/alpha.c Thu Oct 15 19:58:47 1998
+++ egcs-CVS19981015/gcc/config/alpha/alpha.c Fri Oct 16 15:03:41 1998
@@ -264,11 +264,11 @@ override_options ()
if (!alpha_mlat_string)
alpha_mlat_string = "L1";
- if (isdigit (alpha_mlat_string[0])
+ if (ISDIGIT ((unsigned char)alpha_mlat_string[0])
&& (lat = strtol (alpha_mlat_string, &end, 10), *end == '\0'))
;
else if ((alpha_mlat_string[0] == 'L' || alpha_mlat_string[0] == 'l')
- && isdigit (alpha_mlat_string[1])
+ && ISDIGIT ((unsigned char)alpha_mlat_string[1])
&& alpha_mlat_string[2] == '\0')
{
static int const cache_latency[][4] =
diff -rup orig/egcs-CVS19981015/gcc/config/alpha/alpha.h egcs-CVS19981015/gcc/config/alpha/alpha.h
--- orig/egcs-CVS19981015/gcc/config/alpha/alpha.h Thu Oct 15 19:58:48 1998
+++ egcs-CVS19981015/gcc/config/alpha/alpha.h Fri Oct 16 15:03:41 1998
@@ -308,21 +308,21 @@ extern char *alpha_mlat_string; /* For -
#define SUBTARGET_EXTRA_SPECS
#endif
-#define EXTRA_SPECS \
- { "cpp_am_bwx", CPP_AM_BWX_SPEC }, \
- { "cpp_am_max", CPP_AM_MAX_SPEC }, \
- { "cpp_am_cix", CPP_AM_CIX_SPEC }, \
- { "cpp_im_ev4", CPP_IM_EV4_SPEC }, \
- { "cpp_im_ev5", CPP_IM_EV5_SPEC }, \
- { "cpp_im_ev6", CPP_IM_EV6_SPEC }, \
- { "cpp_cpu_ev4", CPP_CPU_EV4_SPEC }, \
- { "cpp_cpu_ev5", CPP_CPU_EV5_SPEC }, \
- { "cpp_cpu_ev56", CPP_CPU_EV56_SPEC }, \
- { "cpp_cpu_pca56", CPP_CPU_PCA56_SPEC }, \
- { "cpp_cpu_ev6", CPP_CPU_EV6_SPEC }, \
- { "cpp_cpu_default", CPP_CPU_DEFAULT_SPEC }, \
- { "cpp_cpu", CPP_CPU_SPEC }, \
- { "cpp_subtarget", CPP_SUBTARGET_SPEC }, \
+#define EXTRA_SPECS \
+ { "cpp_am_bwx", CPP_AM_BWX_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_am_max", CPP_AM_MAX_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_am_cix", CPP_AM_CIX_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_im_ev4", CPP_IM_EV4_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_im_ev5", CPP_IM_EV5_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_im_ev6", CPP_IM_EV6_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_cpu_ev4", CPP_CPU_EV4_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_cpu_ev5", CPP_CPU_EV5_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_cpu_ev56", CPP_CPU_EV56_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_cpu_pca56", CPP_CPU_PCA56_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_cpu_ev6", CPP_CPU_EV6_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_cpu_default", CPP_CPU_DEFAULT_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_cpu", CPP_CPU_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_subtarget", CPP_SUBTARGET_SPEC, 0, 0, 0, 0 }, \
SUBTARGET_EXTRA_SPECS
@@ -1972,7 +1972,7 @@ literal_section () \
This is suitable for output with `assemble_name'. */
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
- sprintf (LABEL, "*$%s%d", PREFIX, NUM)
+ sprintf ((LABEL), "*$%s%ld", (PREFIX), (long)(NUM))
/* Check a floating-point value for validity for a particular machine mode. */
diff -rup orig/egcs-CVS19981017/gcc/config/mips/mips.h egcs-CVS19981017/gcc/config/mips/mips.h
--- orig/egcs-CVS19981017/gcc/config/mips/mips.h Sat Oct 17 09:35:03 1998
+++ egcs-CVS19981017/gcc/config/mips/mips.h Sat Oct 17 12:05:25 1998
@@ -950,18 +950,18 @@ while (0)
Do not define this macro if it does not need to do anything. */
#define EXTRA_SPECS \
- { "subtarget_cc1_spec", SUBTARGET_CC1_SPEC }, \
- { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, \
- { "subtarget_cpp_size_spec", SUBTARGET_CPP_SIZE_SPEC }, \
- { "long_max_spec", LONG_MAX_SPEC }, \
- { "mips_as_asm_spec", MIPS_AS_ASM_SPEC }, \
- { "gas_asm_spec", GAS_ASM_SPEC }, \
- { "target_asm_spec", TARGET_ASM_SPEC }, \
- { "subtarget_mips_as_asm_spec", SUBTARGET_MIPS_AS_ASM_SPEC }, \
- { "subtarget_asm_optimizing_spec", SUBTARGET_ASM_OPTIMIZING_SPEC }, \
- { "subtarget_asm_debugging_spec", SUBTARGET_ASM_DEBUGGING_SPEC }, \
- { "subtarget_asm_spec", SUBTARGET_ASM_SPEC }, \
- { "linker_endian_spec", LINKER_ENDIAN_SPEC }, \
+ { "subtarget_cc1_spec", SUBTARGET_CC1_SPEC, 0, 0, 0, 0 }, \
+ { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC, 0, 0, 0, 0 }, \
+ { "subtarget_cpp_size_spec", SUBTARGET_CPP_SIZE_SPEC, 0, 0, 0, 0 }, \
+ { "long_max_spec", LONG_MAX_SPEC, 0, 0, 0, 0 }, \
+ { "mips_as_asm_spec", MIPS_AS_ASM_SPEC, 0, 0, 0, 0 }, \
+ { "gas_asm_spec", GAS_ASM_SPEC, 0, 0, 0, 0 }, \
+ { "target_asm_spec", TARGET_ASM_SPEC, 0, 0, 0, 0 }, \
+ { "subtarget_mips_as_asm_spec", SUBTARGET_MIPS_AS_ASM_SPEC, 0, 0, 0, 0 }, \
+ { "subtarget_asm_optimizing_spec", SUBTARGET_ASM_OPTIMIZING_SPEC, 0, 0, 0, 0 }, \
+ { "subtarget_asm_debugging_spec", SUBTARGET_ASM_DEBUGGING_SPEC, 0, 0, 0, 0 }, \
+ { "subtarget_asm_spec", SUBTARGET_ASM_SPEC, 0, 0, 0, 0 }, \
+ { "linker_endian_spec", LINKER_ENDIAN_SPEC, 0, 0, 0, 0 }, \
SUBTARGET_EXTRA_SPECS
#ifndef SUBTARGET_EXTRA_SPECS
diff -rup orig/egcs-CVS19981015/gcc/config/rs6000/rs6000.h egcs-CVS19981015/gcc/config/rs6000/rs6000.h
--- orig/egcs-CVS19981015/gcc/config/rs6000/rs6000.h Thu Oct 15 19:59:31 1998
+++ egcs-CVS19981015/gcc/config/rs6000/rs6000.h Fri Oct 16 15:16:03 1998
@@ -157,16 +157,16 @@ Boston, MA 02111-1307, USA. */
#endif
#define EXTRA_SPECS \
- { "cpp_cpu", CPP_CPU_SPEC }, \
- { "cpp_default", CPP_DEFAULT_SPEC }, \
- { "cpp_sysv", CPP_SYSV_SPEC }, \
- { "cpp_sysv_default", CPP_SYSV_DEFAULT_SPEC }, \
- { "cpp_endian_default", CPP_ENDIAN_DEFAULT_SPEC }, \
- { "cpp_endian", CPP_ENDIAN_SPEC }, \
- { "asm_cpu", ASM_CPU_SPEC }, \
- { "asm_default", ASM_DEFAULT_SPEC }, \
- { "link_syscalls", LINK_SYSCALLS_SPEC }, \
- { "link_libg", LINK_LIBG_SPEC }, \
+ { "cpp_cpu", CPP_CPU_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_default", CPP_DEFAULT_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_sysv", CPP_SYSV_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_sysv_default", CPP_SYSV_DEFAULT_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_endian_default", CPP_ENDIAN_DEFAULT_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_endian", CPP_ENDIAN_SPEC, 0, 0, 0, 0 }, \
+ { "asm_cpu", ASM_CPU_SPEC, 0, 0, 0, 0 }, \
+ { "asm_default", ASM_DEFAULT_SPEC, 0, 0, 0, 0 }, \
+ { "link_syscalls", LINK_SYSCALLS_SPEC, 0, 0, 0, 0 }, \
+ { "link_libg", LINK_LIBG_SPEC, 0, 0, 0, 0 }, \
SUBTARGET_EXTRA_SPECS
/* Default location of syscalls.exp under AIX */
@@ -483,7 +483,7 @@ extern int rs6000_debug_arg; /* debug a
/* Define this to change the optimizations performed by default. */
#define OPTIMIZATION_OPTIONS(LEVEL,SIZE) optimization_options(LEVEL,SIZE)
-
+extern void optimization_options ();
/* Show we can debug even without a frame pointer. */
#define CAN_DEBUG_WITHOUT_FP
@@ -2204,7 +2204,7 @@ do {
/* Specify the machine mode that pointers have.
After generation of rtl, the compiler makes no further distinction
between pointers and any other objects of this machine mode. */
-#define Pmode (TARGET_32BIT ? SImode : DImode)
+#define Pmode ((enum machine_mode)(TARGET_32BIT ? SImode : DImode))
/* Mode of a function address in a call instruction (for indexing purposes).
Doesn't matter on RS/6000. */
diff -rup orig/egcs-CVS19981015/gcc/config/sparc/sparc.h egcs-CVS19981015/gcc/config/sparc/sparc.h
--- orig/egcs-CVS19981015/gcc/config/sparc/sparc.h Thu Oct 15 19:59:40 1998
+++ egcs-CVS19981015/gcc/config/sparc/sparc.h Fri Oct 16 15:03:41 1998
@@ -316,20 +316,20 @@ Unrecognized value in TARGET_CPU_DEFAULT
Do not define this macro if it does not need to do anything. */
#define EXTRA_SPECS \
- { "cpp_cpu", CPP_CPU_SPEC }, \
- { "cpp_cpu_default", CPP_CPU_DEFAULT_SPEC }, \
- { "cpp_arch32", CPP_ARCH32_SPEC }, \
- { "cpp_arch64", CPP_ARCH64_SPEC }, \
- { "cpp_arch_default", CPP_ARCH_DEFAULT_SPEC }, \
- { "cpp_arch", CPP_ARCH_SPEC }, \
- { "cpp_endian", CPP_ENDIAN_SPEC }, \
- { "cpp_subtarget", CPP_SUBTARGET_SPEC }, \
- { "asm_cpu", ASM_CPU_SPEC }, \
- { "asm_cpu_default", ASM_CPU_DEFAULT_SPEC }, \
- { "asm_arch32", ASM_ARCH32_SPEC }, \
- { "asm_arch64", ASM_ARCH64_SPEC }, \
- { "asm_arch_default", ASM_ARCH_DEFAULT_SPEC }, \
- { "asm_arch", ASM_ARCH_SPEC }, \
+ { "cpp_cpu", CPP_CPU_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_cpu_default", CPP_CPU_DEFAULT_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_arch32", CPP_ARCH32_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_arch64", CPP_ARCH64_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_arch_default", CPP_ARCH_DEFAULT_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_arch", CPP_ARCH_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_endian", CPP_ENDIAN_SPEC, 0, 0, 0, 0 }, \
+ { "cpp_subtarget", CPP_SUBTARGET_SPEC, 0, 0, 0, 0 }, \
+ { "asm_cpu", ASM_CPU_SPEC, 0, 0, 0, 0 }, \
+ { "asm_cpu_default", ASM_CPU_DEFAULT_SPEC, 0, 0, 0, 0 }, \
+ { "asm_arch32", ASM_ARCH32_SPEC, 0, 0, 0, 0 }, \
+ { "asm_arch64", ASM_ARCH64_SPEC, 0, 0, 0, 0 }, \
+ { "asm_arch_default", ASM_ARCH_DEFAULT_SPEC, 0, 0, 0, 0 }, \
+ { "asm_arch", ASM_ARCH_SPEC, 0, 0, 0, 0 }, \
SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS
@@ -2609,7 +2609,7 @@ extern struct rtx_def *legitimize_pic_ad
/* Specify the machine mode that pointers have.
After generation of rtl, the compiler makes no further distinction
between pointers and any other objects of this machine mode. */
-#define Pmode (TARGET_PTR64 ? DImode : SImode)
+#define Pmode ((enum machine_mode)(TARGET_PTR64 ? DImode : SImode))
/* Generate calls to memcpy, memcmp and memset. */
#define TARGET_MEM_FUNCTIONS
@@ -3029,6 +3029,7 @@ extern int ultrasparc_variable_issue ();
/* This is how we hook in and defer the case-vector until the end of
the function. */
+extern void sparc_defer_case_vector ();
#define ASM_OUTPUT_ADDR_VEC(LAB,VEC) \
sparc_defer_case_vector ((LAB),(VEC), 0)
diff -rup orig/egcs-CVS19981015/gcc/config/svr4.h egcs-CVS19981015/gcc/config/svr4.h
--- orig/egcs-CVS19981015/gcc/config/svr4.h Thu Oct 15 19:58:40 1998
+++ egcs-CVS19981015/gcc/config/svr4.h Fri Oct 16 15:03:41 1998
@@ -950,7 +950,7 @@ do { \
} \
for (p = _ascii_bytes; p < limit && *p != '\0'; p++) \
continue; \
- if (p < limit && (p - _ascii_bytes) <= STRING_LIMIT) \
+ if (p < limit && (p - _ascii_bytes) <= (long)STRING_LIMIT) \
{ \
if (bytes_in_chunk > 0) \
{ \