diff mbox

[i386] : Remove unneeded ATTRIBUTE_UNUSED decorations

Message ID CAFULd4ZsmsYd7qA8vQ02NCvW_5ZW42BqyERhHF7R2LMyPumbNg@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak Aug. 26, 2013, 9:04 a.m. UTC
Hello!

2013-08-26  Uros Bizjak  <ubizjak@gmail.com>

    * config/i386/i386.c (ix86_debug_options): Remove prototype.
    (x86_64_elf_select_section): Ditto.
    (ix86_handle_tm_regparm_attribute): Remove ATTRIBUTE_UNUSED on used
    arguments.
    (ix86_pass_by_reference): Ditto.
    (ix86_return_in_memory): Ditto.
    (output_set_got): Ditto.
    (ix86_unary_operator_ok): Ditto.
    (ix86_expand_builtin): Ditto.

Tested on x86_64-pc-linux-gnu {,-m32} and committed to mainline SVN.

Uros.

Comments

Jakub Jelinek Aug. 26, 2013, 9:13 a.m. UTC | #1
On Mon, Aug 26, 2013 at 11:04:42AM +0200, Uros Bizjak wrote:
>  static bool
> -ix86_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
> +ix86_return_in_memory (const_tree type, const_tree fntype)
>  {
>  #ifdef SUBTARGET_RETURN_IN_MEMORY
>    return SUBTARGET_RETURN_IN_MEMORY (type, fntype);

This doesn't look right, because the SUBTARGET_RETURN_IN_MEMORY
definitions (interix and i386elf) don't mention the FNTYPE anywhere.

	Jakub
Uros Bizjak Aug. 26, 2013, 9:16 a.m. UTC | #2
On Mon, Aug 26, 2013 at 11:13 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Mon, Aug 26, 2013 at 11:04:42AM +0200, Uros Bizjak wrote:
>>  static bool
>> -ix86_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
>> +ix86_return_in_memory (const_tree type, const_tree fntype)
>>  {
>>  #ifdef SUBTARGET_RETURN_IN_MEMORY
>>    return SUBTARGET_RETURN_IN_MEMORY (type, fntype);
>
> This doesn't look right, because the SUBTARGET_RETURN_IN_MEMORY
> definitions (interix and i386elf) don't mention the FNTYPE anywhere.

Uh, I missed the "#else".

Fixed in a followup patch.

Thanks,
Uros.
diff mbox

Patch

Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c	(revision 201986)
+++ config/i386/i386.c	(working copy)
@@ -2321,7 +2321,6 @@ 
 
 static char *ix86_target_string (HOST_WIDE_INT, int, const char *,
 				 const char *, enum fpmath_unit, bool);
-static void ix86_debug_options (void) ATTRIBUTE_UNUSED;
 static void ix86_function_specific_save (struct cl_target_option *);
 static void ix86_function_specific_restore (struct cl_target_option *);
 static void ix86_function_specific_print (FILE *, int,
@@ -2754,7 +2753,7 @@ 
 
 /* Function that is callable from the debugger to print the current
    options.  */
-void
+void ATTRIBUTE_UNUSED
 ix86_debug_options (void)
 {
   char *opts = ix86_target_string (ix86_isa_flags, target_flags,
@@ -4848,10 +4847,7 @@ 
    RELOC indicates whether forming the initial value of DECL requires
    link-time relocations.  */
 
-static section * x86_64_elf_select_section (tree, int, unsigned HOST_WIDE_INT)
-	ATTRIBUTE_UNUSED;
-
-static section *
+static section * ATTRIBUTE_UNUSED
 x86_64_elf_select_section (tree decl, int reloc,
 			   unsigned HOST_WIDE_INT align)
 {
@@ -5303,8 +5299,7 @@ 
 static tree
 ix86_handle_tm_regparm_attribute (tree *node, tree name ATTRIBUTE_UNUSED,
     				  tree args ATTRIBUTE_UNUSED,
-				  int flags ATTRIBUTE_UNUSED,
-				  bool *no_add_attrs)
+				  int flags, bool *no_add_attrs)
 {
   tree alt;
 
@@ -7228,8 +7223,7 @@ 
    appropriate for passing a pointer to that type.  */
 
 static bool
-ix86_pass_by_reference (cumulative_args_t cum_v ATTRIBUTE_UNUSED,
-			enum machine_mode mode ATTRIBUTE_UNUSED,
+ix86_pass_by_reference (cumulative_args_t cum_v, enum machine_mode mode,
 			const_tree type, bool named ATTRIBUTE_UNUSED)
 {
   CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
@@ -7762,7 +7756,7 @@ 
 }
 
 static bool
-ix86_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
+ix86_return_in_memory (const_tree type, const_tree fntype)
 {
 #ifdef SUBTARGET_RETURN_IN_MEMORY
   return SUBTARGET_RETURN_IN_MEMORY (type, fntype);
@@ -8950,7 +8944,7 @@ 
 /* Emit code for the SET_GOT patterns.  */
 
 const char *
-output_set_got (rtx dest, rtx label ATTRIBUTE_UNUSED)
+output_set_got (rtx dest, rtx label)
 {
   rtx xops[3];
 
@@ -18060,7 +18054,7 @@ 
 bool
 ix86_unary_operator_ok (enum rtx_code code ATTRIBUTE_UNUSED,
 			enum machine_mode mode ATTRIBUTE_UNUSED,
-			rtx operands[2] ATTRIBUTE_UNUSED)
+			rtx operands[2])
 {
   /* If one of operands is memory, source and destination must match.  */
   if ((MEM_P (operands[0])
@@ -32154,9 +32148,8 @@ 
    IGNORE is nonzero if the value is to be ignored.  */
 
 static rtx
-ix86_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
-		     enum machine_mode mode ATTRIBUTE_UNUSED,
-		     int ignore ATTRIBUTE_UNUSED)
+ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
+		     enum machine_mode mode, int ignore)
 {
   const struct builtin_description *d;
   size_t i;