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: add some ATTRIBUTE_UNUSEDs


The following patch adds two ATTRIBUTE_UNUSEDs to eliminate warnings on
targets (eg spu-elf) where some target macros may not reference all of
the macro parameters.

Pre-approved by Ian and committed.

Ben

2007-07-22  Ben Elliston  <bje@au.ibm.com>

        * regclass.c (invalid_mode_change_p): Attach ATTRIBUTE_UNUSED to
        `class' parameter.
        * struct-equiv.c (note_local_live): Likewise for `y_regno'.

Index: regclass.c
===================================================================
--- regclass.c  (revision 126810)
+++ regclass.c  (working copy)
@@ -2444,7 +2444,8 @@ cannot_change_mode_set_regs (HARD_REG_SE
    mode.  */
 
 bool
-invalid_mode_change_p (unsigned int regno, enum reg_class class,
+invalid_mode_change_p (unsigned int regno,
+                      enum reg_class class ATTRIBUTE_UNUSED,
                       enum machine_mode from)
 {
   struct subregs_of_mode_node dummy, *node;
Index: struct-equiv.c
===================================================================
--- struct-equiv.c      (revision 126810)
+++ struct-equiv.c      (working copy)
@@ -328,7 +328,7 @@ note_local_live (struct equiv_info *info
       if (reload_completed)
        {
          unsigned x_regno ATTRIBUTE_UNUSED = REGNO (x);
-         unsigned y_regno = REGNO (y);
+         unsigned y_regno ATTRIBUTE_UNUSED = REGNO (y);
          enum machine_mode x_mode = GET_MODE (x);
 
          if (secondary_reload_class (0, REGNO_REG_CLASS (y_regno), x_mode, x)



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