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]

[csl-arm] Compiler warning removal for arm_pad_reg_upward, arm_handle_notshared_attribute


Hi,

This patch gets rid of build warnings for arm_pad_reg_upward (unused parameters) and arm_handle_notshared_attribute (sometimes defined but not used).

Tested by building with arm-none-eabi and arm-none-symbianelf (preprocessor conditional true for latter).

OK to apply?

ChangeLog:

  * config/arm/arm.c (arm_handle_notshared_attribute): Protect prototype
  and implementation with preprocessor conditional.
  (arm_pad_reg_upwards): Add ATTRIBUTE_UNUSED.
Index: gcc/config/arm/arm.c
===================================================================
RCS file: /home/gcc/repos/gcc/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.303.2.73
diff -c -p -r1.303.2.73 arm.c
*** gcc/config/arm/arm.c	22 Mar 2005 20:19:16 -0000	1.303.2.73
--- gcc/config/arm/arm.c	28 Mar 2005 01:12:44 -0000
*************** static unsigned long arm_isr_value (tree
*** 113,119 ****
--- 113,121 ----
  static unsigned long arm_compute_func_type (void);
  static tree arm_handle_fndecl_attribute (tree *, tree, tree, int, bool *);
  static tree arm_handle_isr_attribute (tree *, tree, tree, int, bool *);
+ #if TARGET_DLLIMPORT_DECL_ATTRIBUTES
  static tree arm_handle_notshared_attribute (tree *, tree, tree, int, bool *);
+ #endif
  static void arm_output_function_epilogue (FILE *, HOST_WIDE_INT);
  static void arm_output_function_prologue (FILE *, HOST_WIDE_INT);
  static void thumb_output_function_prologue (FILE *, HOST_WIDE_INT);
*************** arm_pad_arg_upward (enum machine_mode mo
*** 2666,2672 ****
   * upwards.  */
  
  bool
! arm_pad_reg_upward (enum machine_mode mode, tree type, int first)
  {
    if (TARGET_AAPCS_BASED
        && BYTES_BIG_ENDIAN
--- 2668,2675 ----
   * upwards.  */
  
  bool
! arm_pad_reg_upward (enum machine_mode mode ATTRIBUTE_UNUSED,
!                     tree type, int first ATTRIBUTE_UNUSED)
  {
    if (TARGET_AAPCS_BASED
        && BYTES_BIG_ENDIAN
*************** arm_handle_isr_attribute (tree *node, tr
*** 2819,2824 ****
--- 2822,2828 ----
    return NULL_TREE;
  }
  
+ #if TARGET_DLLIMPORT_DECL_ATTRIBUTES
  /* Handle the "notshared" attribute.  This attribute is another way of
     requesting hidden visibility.  ARM's compiler supports
     "__declspec(notshared)"; we support the same thing via an
*************** arm_handle_notshared_attribute (tree *no
*** 2841,2846 ****
--- 2845,2851 ----
      }
    return NULL_TREE;
  }
+ #endif
  
  /* Return 0 if the attributes for two types are incompatible, 1 if they
     are compatible, and 2 if they are nearly compatible (which causes a

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