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]

[lto] Use nth_parm_type and num_parm_types in handle_sentinel_attribute.


Hi,

Tested on x86_64-pc-linux-gnu.  Committed to the LTO branch as
obvious.

Kazu Hirata

2006-07-14  Kazu Hirata  <kazu@codesourcery.com>

	* c-common.c (handle_sentinel_attribute): Use nth_parm_type
	and num_parm_types.

Index: c-common.c
===================================================================
--- c-common.c	(revision 115307)
+++ c-common.c	(working copy)
@@ -5634,7 +5634,7 @@ handle_sentinel_attribute (tree *node, t
     }
   else
     {
-      if (VOID_TYPE_P (TREE_VALUE (tree_last (params))))
+      if (VOID_TYPE_P (nth_parm_type (params, num_parm_types (params) - 1)))
 	{
 	  warning (OPT_Wattributes,
 		   "%qE attribute only applies to variadic functions", name);


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