From d1e6b55b7aad1d74979f9ea5c3029340e8e36707 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Fri, 23 Oct 1998 12:39:18 +0000 Subject: [PATCH] Warning fixes: * 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. From-SVN: r23253 --- gcc/ChangeLog | 9 +++++++++ gcc/config/alpha/alpha.c | 4 ++-- gcc/config/alpha/alpha.h | 32 ++++++++++++++++---------------- 3 files changed, 27 insertions(+), 18 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 41100f7a771..f39d2f64a45 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +Fri Oct 23 15:34:14 1998 Kaveh R. Ghazi + + * 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. + Fri Oct 23 13:12:35 1998 Jeffrey A Law (law@cygnus.com) * mn10200.md (truncated shift): Accept constant inputs too. diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index dca15802a8f..c9506a66679 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -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 --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h index 0a99e07a556..d9efa596233 100644 --- a/gcc/config/alpha/alpha.h +++ b/gcc/config/alpha/alpha.h @@ -308,21 +308,21 @@ extern char *alpha_mlat_string; /* For -mmemory-latency= */ #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. */ -- 2.30.2