This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: add some ATTRIBUTE_UNUSEDs
- From: Ben Elliston <bje at au1 dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: iant at google dot com
- Date: Sun, 22 Jul 2007 06:26:59 +1000
- Subject: 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)