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] ARM: fix unused warning for arm_handle_notshared_attribute


arm_handle_notshared_attribute is a static function that is only used
when TARGET_DLLIMPORT_DECL_ATTRIBUTES is defined.  So we get a fatal
warning when doing a native bootstrap.  Fixed by wrapping the
declaration and use with include guards.

R.

2004-11-08  Richard Earnshaw  <rearnsha@arm.com>

	* arm.c (arm_handle_notshared_attribute): Wrap declaration and use
	with #if TARGET_DLLIMPORT_DECL_ATTRIBUTES.


Index: arm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.414
diff -p -r1.414 arm.c
*** arm.c	5 Nov 2004 00:18:49 -0000	1.414
--- arm.c	8 Nov 2004 17:15:06 -0000
*************** static unsigned long arm_isr_value (tree
*** 114,120 ****
--- 114,122 ----
  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_handle_isr_attribute (tree *node, tr
*** 2670,2675 ****
--- 2672,2678 ----
    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
*** 2692,2697 ****
--- 2695,2701 ----
      }
    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]