Hi,

these macros don't use reserved names for local variables.
This caused -Wshadow=local warnings in varasm.c IIRC.

Fixed by using _lowercase reserved names for macro parameters.


Bootstrapped and reg-tested on x86_64-pc-linux-gnu.
Is it OK for trunk?


Thanks
Bernd.


2019-10-04  Bernd Edlinger  <bernd.edlin...@hotmail.de>

	* config/elfos.h (ASM_DECLARE_OBJECT_NAME,
	ASM_FINISH_DECLARE_OBJECT): Rename local vars in macro.

Index: gcc/config/elfos.h
===================================================================
--- gcc/config/elfos.h	(revision 276484)
+++ gcc/config/elfos.h	(working copy)
@@ -311,7 +311,7 @@ see the files COPYING3 and COPYING.RUNTIME respect
 #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL)			\
   do									\
     {									\
-      HOST_WIDE_INT size;						\
+      HOST_WIDE_INT _size;						\
 									\
       /* For template static data member instantiations or		\
 	 inline fn local statics and their guard variables, use		\
@@ -329,8 +329,8 @@ see the files COPYING3 and COPYING.RUNTIME respect
 	  && (DECL) && DECL_SIZE (DECL))				\
 	{								\
 	  size_directive_output = 1;					\
-	  size = tree_to_uhwi (DECL_SIZE_UNIT (DECL));			\
-	  ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size);			\
+	  _size = tree_to_uhwi (DECL_SIZE_UNIT (DECL));			\
+	  ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, _size);		\
 	}								\
 									\
       ASM_OUTPUT_LABEL (FILE, NAME);					\
@@ -347,8 +347,8 @@ see the files COPYING3 and COPYING.RUNTIME respect
 #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END)\
   do								\
     {								\
-      const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0);	\
-      HOST_WIDE_INT size;					\
+      const char *_name = XSTR (XEXP (DECL_RTL (DECL), 0), 0);	\
+      HOST_WIDE_INT _size;					\
 								\
       if (!flag_inhibit_size_directive				\
 	  && DECL_SIZE (DECL)					\
@@ -357,8 +357,8 @@ see the files COPYING3 and COPYING.RUNTIME respect
 	  && !size_directive_output)				\
 	{							\
 	  size_directive_output = 1;				\
-	  size = tree_to_uhwi (DECL_SIZE_UNIT (DECL));		\
-	  ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size);		\
+	  _size = tree_to_uhwi (DECL_SIZE_UNIT (DECL));		\
+	  ASM_OUTPUT_SIZE_DIRECTIVE (FILE, _name, _size);	\
 	}							\
     }								\
   while (0)

Reply via email to