diff mbox

hookize FUNCTION_{INCOMING_,}ARG and FUNCTION_ARG_ADVANCE

Message ID 20100629141832.GN22606@codesourcery.com
State New
Headers show

Commit Message

Nathan Froyd June 29, 2010, 2:18 p.m. UTC
On Tue, Jun 29, 2010 at 07:13:37AM -0700, H.J. Lu wrote:
> This caused:
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44713

Bother.  Worked on my machine...

Testing patch below, will commit as obvious if it goes through.

-Nathan

Comments

H.J. Lu June 29, 2010, 2:33 p.m. UTC | #1
On Tue, Jun 29, 2010 at 7:18 AM, Nathan Froyd <froydnj@codesourcery.com> wrote:
> On Tue, Jun 29, 2010 at 07:13:37AM -0700, H.J. Lu wrote:
>> This caused:
>>
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44713
>
> Bother.  Worked on my machine...
>
> Testing patch below, will commit as obvious if it goes through.

Please fix all warnings/errors on i386.c. I saw:

../../src-trunk/gcc/config/i386/i386.c: In function
'ix86_function_arg_advance':
../../src-trunk/gcc/config/i386/i386.c:6086:5: error: passing argument 3 of
'function_arg_advance_64' discards 'const' qualifier from pointer target type
[-Werror]
../../src-trunk/gcc/config/i386/i386.c:6027:1: note: expected 'tree' but
argument is of type 'const_tree'
../../src-trunk/gcc/config/i386/i386.c:6088:5: error: passing argument 3 of
'function_arg_advance_32' discards 'const' qualifier from pointer target type
[-Werror]
../../src-trunk/gcc/config/i386/i386.c:5939:1: note: expected 'tree' but
argument is of type 'const_tree'
../../src-trunk/gcc/config/i386/i386.c: In function 'ix86_function_arg':
../../src-trunk/gcc/config/i386/i386.c:6331:5: error: passing argument 2 of
'type_natural_mode' discards 'const' qualifier from pointer target type
[-Werror]
../../src-trunk/gcc/config/i386/i386.c:5183:1: note: expected 'struct
CUMULATIVE_ARGS *' but argument is of type 'const struct CUMULATIVE_ARGS *'
../../src-trunk/gcc/config/i386/i386.c:6334:5: error: passing argument 1 of
'function_arg_ms_64' discards 'const' qualifier from pointer target type
[-Werror]
../../src-trunk/gcc/config/i386/i386.c:6258:1: note: expected 'struct
CUMULATIVE_ARGS *' but argument is of type 'const struct CUMULATIVE_ARGS *'
../../src-trunk/gcc/config/i386/i386.c:6336:5: error: passing argument 1 of
'function_arg_64' discards 'const' qualifier from pointer target type [-Werror]
../../src-trunk/gcc/config/i386/i386.c:6222:1: note: expected 'struct
CUMULATIVE_ARGS *' but argument is of type 'const struct CUMULATIVE_ARGS *'
../../src-trunk/gcc/config/i386/i386.c:6336:5: error: passing argument 4 of
'function_arg_64' discards 'const' qualifier from pointer target type [-Werror]
../../src-trunk/gcc/config/i386/i386.c:6222:1: note: expected 'tree' but
argument is of type 'const_tree'
../../src-trunk/gcc/config/i386/i386.c:6338:5: error: passing argument 1 of
'function_arg_32' discards 'const' qualifier from pointer target type [-Werror]
../../src-trunk/gcc/config/i386/i386.c:6105:1: note: expected 'struct
CUMULATIVE_ARGS *' but argument is of type 'const struct CUMULATIVE_ARGS *'
../../src-trunk/gcc/config/i386/i386.c:6338:5: error: passing argument 4 of
'function_arg_32' discards 'const' qualifier from pointer target type [-Werror]
../../src-trunk/gcc/config/i386/i386.c:6105:1: note: expected 'tree' but
argument is of type 'const_tree'
../../src-trunk/gcc/config/i386/i386.c: In function
'ix86_setup_incoming_varargs':
../../src-trunk/gcc/config/i386/i386.c:7050:5: error: implicit declaration of
function 'function_arg_advance' [-Werror=implicit-function-declaration]
../../src-trunk/gcc/config/i386/i386.c: At top level:
../../src-trunk/gcc/config/i386/i386.c:30995:8: error: initialization from
incompatible pointer type [-Werror]
../../src-trunk/gcc/config/i386/i386.c:30995:8: error: (near initialization for
'targetm.calls.function_arg_advance') [-Werror]
../../src-trunk/gcc/config/i386/i386.c:30995:8: error: initialization from
incompatible pointer type [-Werror]
../../src-trunk/gcc/config/i386/i386.c:30995:8: error: (near initialization for
'targetm.calls.function_arg') [-Werror]
../../src-trunk/gcc/config/i386/i386.c:30995:8: error: initialization from
incompatible pointer type [-Werror]
../../src-trunk/gcc/config/i386/i386.c:30995:8: error: (near initialization for
'targetm.calls.function_incoming_arg') [-Werror]

Thanks.
diff mbox

Patch

Index: i386.c
===================================================================
--- i386.c	(revision 161534)
+++ i386.c	(working copy)
@@ -6025,7 +6025,7 @@  function_arg_advance_32 (CUMULATIVE_ARGS
 
 static void
 function_arg_advance_64 (CUMULATIVE_ARGS *cum, enum machine_mode mode,
-			 tree type, HOST_WIDE_INT words, int named)
+			 tree type, HOST_WIDE_INT words, bool named)
 {
   int int_nregs, sse_nregs;
 
@@ -6067,7 +6067,7 @@  function_arg_advance_ms_64 (CUMULATIVE_A
 
 static void
 ix86_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
-			   const_tree type, int named)
+			   const_tree type, bool named)
 {
   HOST_WIDE_INT bytes, words;
 
@@ -6220,7 +6220,7 @@  function_arg_32 (CUMULATIVE_ARGS *cum, e
 
 static rtx
 function_arg_64 (CUMULATIVE_ARGS *cum, enum machine_mode mode,
-		 enum machine_mode orig_mode, tree type, int named)
+		 enum machine_mode orig_mode, tree type, bool named)
 {
   /* Handle a hidden AL argument containing number of registers
      for varargs x86-64 functions.  */
@@ -6256,7 +6256,7 @@  function_arg_64 (CUMULATIVE_ARGS *cum, e
 
 static rtx
 function_arg_ms_64 (CUMULATIVE_ARGS *cum, enum machine_mode mode,
-		    enum machine_mode orig_mode, int named,
+		    enum machine_mode orig_mode, bool named,
 		    HOST_WIDE_INT bytes)
 {
   unsigned int regno;
@@ -6314,7 +6314,7 @@  function_arg_ms_64 (CUMULATIVE_ARGS *cum
 
 static rtx
 ix86_function_arg (const CUMULATIVE_ARGS *cum, enum machine_mode omode,
-		   const_tree type, int named)
+		   const_tree type, bool named)
 {
   enum machine_mode mode = omode;
   HOST_WIDE_INT bytes, words;