This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch,avr,committed] Remove dead avr_inform_devices


https://gcc.gnu.org/r250264

Applied this patch which removes stuff dead since

https://gcc.gnu.org/r239246

Committed as obvious.

Johann

	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.
Index: config/avr/avr-arch.h
===================================================================
--- config/avr/avr-arch.h	(revision 250090)
+++ config/avr/avr-arch.h	(working copy)
@@ -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 */
Index: config/avr/avr-devices.c
===================================================================
--- config/avr/avr-devices.c	(revision 250090)
+++ config/avr/avr-devices.c	(working copy)
@@ -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 @@ if (!mcu->macro)
 }
 
   
-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)
 {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]