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]: Fix warning from varasm.c on hppa64-hp-hpux11.11


This patch fixes a bootstrap failure for the  hppa64-hp-hpux11* port
on the trunk.  The define for ASM_OUTPUT_ALIGNED_COMMON in pa64-hpux.h
generated signed/unsigned warnings due to the promotion rules for
integers.

Tested on hppa64-hp-hpux11.11 and hppa2.0w-hp-hpux11.11.  Installed
on the trunk.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2003-06-06  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	* pa.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_ALIGNED_COMMON,
	ASM_OUTPUT_ALIGNED_LOCAL): Cast `SIZE' and `ALIGNED' parameters to
	unsigned HOST_WIDE_INT.
	* pa-pro-end.h (ASM_OUTPUT_ALIGNED_COMMOM, ASM_OUTPUT_ALIGNED_LOCAL):
	Likewise.
	* pa64-hpux.h (ASM_OUTPUT_ALIGNED_COMMON, ASM_OUTPUT_ALIGNED_LOCAL):
	Likewise.

Index: config/pa/pa.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa.h,v
retrieving revision 1.194
diff -u -3 -p -r1.194 pa.h
--- config/pa/pa.h	4 Jun 2003 17:53:07 -0000	1.194
+++ config/pa/pa.h	6 Jun 2003 00:26:57 -0000
@@ -1755,7 +1755,8 @@ do { 									\
     fprintf (FILE, "\t.align %d\n", (1<<(LOG)))
 
 #define ASM_OUTPUT_SKIP(FILE,SIZE)  \
-  fprintf (FILE, "\t.blockz "HOST_WIDE_INT_PRINT_UNSIGNED"\n", (SIZE))
+  fprintf (FILE, "\t.blockz "HOST_WIDE_INT_PRINT_UNSIGNED"\n",		\
+	   (unsigned HOST_WIDE_INT)(SIZE))
 
 /* This says how to output an assembler line to define a global common symbol
    with size SIZE (in bytes) and alignment ALIGN (in bits).  */
@@ -1764,7 +1765,8 @@ do { 									\
 { bss_section ();							\
   assemble_name ((FILE), (NAME));					\
   fprintf ((FILE), "\t.comm "HOST_WIDE_INT_PRINT_UNSIGNED"\n",		\
-	   MAX ((HOST_WIDE_INT)(SIZE), (HOST_WIDE_INT)((ALIGNED) / BITS_PER_UNIT)));}
+	   MAX ((unsigned HOST_WIDE_INT)(SIZE),				\
+		((unsigned HOST_WIDE_INT)(ALIGNED) / BITS_PER_UNIT)));}
 
 /* This says how to output an assembler line to define a local common symbol
    with size SIZE (in bytes) and alignment ALIGN (in bits).  */
@@ -1774,7 +1776,7 @@ do { 									\
   fprintf ((FILE), "\t.align %d\n", ((ALIGNED) / BITS_PER_UNIT));	\
   assemble_name ((FILE), (NAME));					\
   fprintf ((FILE), "\n\t.block "HOST_WIDE_INT_PRINT_UNSIGNED"\n",	\
-	   (SIZE));}
+	   (unsigned HOST_WIDE_INT)(SIZE));}
   
 #define ASM_PN_FORMAT "%s___%lu"
 
Index: config/pa/pa-pro-end.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa-pro-end.h,v
retrieving revision 1.10
diff -u -3 -p -r1.10 pa-pro-end.h
--- config/pa/pa-pro-end.h	4 Jun 2003 17:53:07 -0000	1.10
+++ config/pa/pa-pro-end.h	6 Jun 2003 00:26:57 -0000
@@ -64,7 +64,8 @@ Boston, MA 02111-1307, USA.  */
 { bss_section ();							\
   assemble_name ((FILE), (NAME));					\
   fprintf ((FILE), "\t.comm "HOST_WIDE_INT_PRINT_UNSIGNED"\n",		\
-	   MAX ((HOST_WIDE_INT)(SIZE), (HOST_WIDE_INT)((ALIGNED) / BITS_PER_UNIT)));}
+	   MAX ((unsigned HOST_WIDE_INT)(SIZE),				\
+		((unsigned HOST_WIDE_INT)(ALIGNED) / BITS_PER_UNIT)));}
 
 /* This says how to output an assembler line to define a local common symbol
    with size SIZE (in bytes) and alignment ALIGN (in bits).  */
@@ -74,4 +75,5 @@ Boston, MA 02111-1307, USA.  */
 { bss_section ();							\
   fprintf ((FILE), "\t.align %d\n", ((ALIGNED) / BITS_PER_UNIT));	\
   assemble_name ((FILE), (NAME));					\
-  fprintf ((FILE), "\n\t.block "HOST_WIDE_INT_PRINT_UNSIGNED"\n", (SIZE));}
+  fprintf ((FILE), "\n\t.block "HOST_WIDE_INT_PRINT_UNSIGNED"\n",	\
+	   (unsigned HOST_WIDE_INT)(SIZE));}
Index: config/pa/pa64-hpux.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa64-hpux.h,v
retrieving revision 1.26
diff -u -3 -p -r1.26 pa64-hpux.h
--- config/pa/pa64-hpux.h	21 May 2003 22:00:57 -0000	1.26
+++ config/pa/pa64-hpux.h	6 Jun 2003 00:26:57 -0000
@@ -141,7 +141,8 @@ do {									\
   bss_section ();							\
   assemble_name ((FILE), (NAME));					\
   fprintf ((FILE), "\t.comm "HOST_WIDE_INT_PRINT_UNSIGNED"\n",		\
-	   MAX ((SIZE), ((ALIGN) / BITS_PER_UNIT)));			\
+	   MAX ((unsigned HOST_WIDE_INT)(SIZE),				\
+		((unsigned HOST_WIDE_INT)(ALIGN) / BITS_PER_UNIT)));	\
 } while (0)
 
 #undef ASM_OUTPUT_ALIGNED_LOCAL
@@ -150,7 +151,8 @@ do {									\
   bss_section ();							\
   fprintf ((FILE), "\t.align %d\n", ((ALIGN) / BITS_PER_UNIT));		\
   assemble_name ((FILE), (NAME));					\
-  fprintf ((FILE), "\n\t.block "HOST_WIDE_INT_PRINT_UNSIGNED"\n", (SIZE));\
+  fprintf ((FILE), "\n\t.block "HOST_WIDE_INT_PRINT_UNSIGNED"\n",	\
+	   (unsigned HOST_WIDE_INT)(SIZE));				\
 } while (0)
 
 /* The define in pa.h doesn't work with the alias attribute.  The


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