]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
function.c (assign_parms): New variable named_arg, with value depending on STRICT_ARG...
authorJim Wilson <wilson@cygnus.com>
Sun, 8 Feb 1998 23:01:35 +0000 (23:01 +0000)
committerJeff Law <law@gcc.gnu.org>
Sun, 8 Feb 1998 23:01:35 +0000 (16:01 -0700)
        * function.c (assign_parms): New variable named_arg, with value
        depending on STRICT_ARGUMENT_NAMING.  Use instead of ! last_named.

From-SVN: r17787

gcc/ChangeLog
gcc/function.c

index 332025bdbc7a0f73fe5a6f5ccde9728c0865ca03..2480adb6c4503c91ba73d5ecd00777141773341b 100644 (file)
@@ -1,3 +1,8 @@
+Mon Feb  9 00:02:53 1998  Jim Wilson  <wilson@cygnus.com>
+
+       * function.c (assign_parms): New variable named_arg, with value
+       depending on STRICT_ARGUMENT_NAMING.  Use instead of ! last_named.
+
 Mon Feb  9 00:01:00 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
        * loop.c (strength_reduce): When placing increment for auto-inc
index 057da555c71ab4211e211150df151e4a2d5cfc62..6efa422117260cbab1cd7879bc3ed80ea83b72f8 100644 (file)
@@ -3418,10 +3418,18 @@ assign_parms (fndecl, second_time)
       tree nominal_type = TREE_TYPE (parm);
 
       /* Set LAST_NAMED if this is last named arg before some
-        anonymous args.  We treat it as if it were anonymous too.  */
+        anonymous args.  */
       int last_named = ((TREE_CHAIN (parm) == 0
                         || DECL_NAME (TREE_CHAIN (parm)) == 0)
                        && (stdarg || current_function_varargs));
+      /* Set NAMED_ARG if this arg should be treated as a named arg.  For
+        most machines, if this is a varargs/stdarg function, then we treat
+        the last named arg as if it were anonymous too.  */
+#ifdef STRICT_ARGUMENT_NAMING
+      int named_arg = 1;
+#else
+      int named_arg = ! last_named;
+#endif
 
       if (TREE_TYPE (parm) == error_mark_node
          /* This can happen after weird syntax errors
@@ -3470,7 +3478,7 @@ assign_parms (fndecl, second_time)
          || TREE_ADDRESSABLE (passed_type)
 #ifdef FUNCTION_ARG_PASS_BY_REFERENCE
          || FUNCTION_ARG_PASS_BY_REFERENCE (args_so_far, passed_mode,
-                                             passed_type, ! last_named)
+                                             passed_type, named_arg)
 #endif
          )
        {
@@ -3490,10 +3498,10 @@ assign_parms (fndecl, second_time)
         0 means it arrives on the stack.  */
 #ifdef FUNCTION_INCOMING_ARG
       entry_parm = FUNCTION_INCOMING_ARG (args_so_far, promoted_mode,
-                                         passed_type, ! last_named);
+                                         passed_type, named_arg);
 #else
       entry_parm = FUNCTION_ARG (args_so_far, promoted_mode,
-                                passed_type, ! last_named);
+                                passed_type, named_arg);
 #endif
 
       if (entry_parm == 0)
@@ -3539,12 +3547,12 @@ assign_parms (fndecl, second_time)
 #ifdef FUNCTION_INCOMING_ARG
                           FUNCTION_INCOMING_ARG (args_so_far, promoted_mode,
                                                  passed_type,
-                                                 (! last_named
+                                                 (named_arg
                                                   || varargs_setup)) != 0,
 #else
                           FUNCTION_ARG (args_so_far, promoted_mode,
                                         passed_type,
-                                        ! last_named || varargs_setup) != 0,
+                                        named_arg || varargs_setup) != 0,
 #endif
 #endif
                           fndecl, &stack_args_size, &stack_offset, &arg_size);
@@ -3584,7 +3592,7 @@ assign_parms (fndecl, second_time)
       if (entry_parm)
        {
          int nregs = FUNCTION_ARG_PARTIAL_NREGS (args_so_far, promoted_mode,
-                                                 passed_type, ! last_named);
+                                                 passed_type, named_arg);
 
          if (nregs > 0)
            {
@@ -3649,7 +3657,7 @@ assign_parms (fndecl, second_time)
       /* Update info on where next arg arrives in registers.  */
 
       FUNCTION_ARG_ADVANCE (args_so_far, promoted_mode,
-                           passed_type, ! last_named);
+                           passed_type, named_arg);
 
       /* If this is our second time through, we are done with this parm.  */
       if (second_time)
@@ -3902,7 +3910,7 @@ assign_parms (fndecl, second_time)
                   && FUNCTION_ARG_CALLEE_COPIES (args_so_far,
                                                  TYPE_MODE (DECL_ARG_TYPE (parm)),
                                                  DECL_ARG_TYPE (parm),
-                                                 ! last_named)
+                                                 named_arg)
                   && ! TREE_ADDRESSABLE (DECL_ARG_TYPE (parm)))
            {
              rtx copy;