From: Georg-Johann Lay Date: Mon, 17 Jul 2017 09:32:42 +0000 (+0000) Subject: Remove stuff dead since r239246. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f986e51e6c9caa727aa1364fb636814903aeccc8;p=gcc.git Remove stuff dead since r239246. * config/avr/avr-arch.h (avr_inform_devices): Remove dead proto. * config/avr/avr-devices.c (mcu_name, comparator, avr_mcus_str) (avr_inform_devices): Remove dead stuff. From-SVN: r250264 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f4acad4947a..db3540155ef 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2017-07-17 Georg-Johann Lay + + Remove stuff dead since r239246. + + * config/avr/avr-arch.h (avr_inform_devices): Remove dead proto. + * config/avr/avr-devices.c (mcu_name, comparator, avr_mcus_str) + (avr_inform_devices): Remove dead stuff. + 2017-07-17 Tamar Christina * config/arm/arm_neon.h: Fix softp typo. diff --git a/gcc/config/avr/avr-arch.h b/gcc/config/avr/avr-arch.h index e38345b69e3..891f73cb1b1 100644 --- a/gcc/config/avr/avr-arch.h +++ b/gcc/config/avr/avr-arch.h @@ -195,7 +195,6 @@ extern const avr_arch_t *avr_arch; extern const avr_mcu_t avr_mcu_types[]; -extern void avr_inform_devices (void); extern void avr_inform_core_architectures (void); #endif /* AVR_ARCH_H */ diff --git a/gcc/config/avr/avr-devices.c b/gcc/config/avr/avr-devices.c index c391ef9cd8e..9961588eef7 100644 --- a/gcc/config/avr/avr-devices.c +++ b/gcc/config/avr/avr-devices.c @@ -128,39 +128,6 @@ avr_mcu_types[] = #ifndef IN_GEN_AVR_MMCU_TEXI -/* Copy-pastes from `gen-avr-mmcu-texi.c' follow... */ - -static const char* -mcu_name[sizeof avr_mcu_types / sizeof avr_mcu_types[0]]; - -static int -comparator (const void *va, const void *vb) -{ - const char *a = *(const char* const*) va; - const char *b = *(const char* const*) vb; - - while (*a && *b) - { - /* Make letters smaller than digits so that `atmega16a' follows - `atmega16' without `atmega161' etc. between them. */ - - if (ISALPHA (*a) && ISDIGIT (*b)) - return -1; - - if (ISDIGIT (*a) && ISALPHA (*b)) - return 1; - - if (*a != *b) - return *a - *b; - - a++; - b++; - } - - return *a - *b; -} - - static char* avr_archs_str (void) { @@ -176,39 +143,6 @@ avr_archs_str (void) } -static char* -avr_mcus_str (void) -{ - size_t n_mcus = 0; - char *mcus = concat ("", NULL); - - // Build array of proper devices' names. - - for (const avr_mcu_t *mcu = avr_mcu_types; mcu->name; mcu++) - if (mcu->macro) - mcu_name[n_mcus++] = mcu->name; - - // Sort MCUs so that they are displayed in the same canonical order as - // in doc/avr-mcus.texi. - - qsort (mcu_name, n_mcus, sizeof (char*), comparator); - - for (size_t i = 0; i < n_mcus; i++) - mcus = concat (mcus, " ", mcu_name[i], NULL); - - return mcus; -} - - -void -avr_inform_devices (void) -{ - char *mcus = avr_mcus_str (); - inform (input_location, "devices natively supported:%s", mcus); - free (mcus); -} - - void avr_inform_core_architectures (void) {