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]

Re: [tuples] start c_gimple_diagnostics_recursively conversion


On 7/23/07 6:58 PM, Aldy Hernandez wrote:

> Index: c-common.c
> ===================================================================
> --- c-common.c	(revision 126849)
> +++ c-common.c	(working copy)
> @@ -6450,12 +6450,12 @@ c_warn_unused_result (gimple_seq seq)
>  	  /* This is a naked call, as opposed to a GIMPLE_CALL with an
>  	     LHS.  All calls whose value is ignored should be
>  	     represented like this.  Look for the attribute.  */
> -	  fdecl = gimple_call_fn (g);
> -	  if (TREE_CODE (fdecl) == VAR_DECL)
> +	  fdecl = get_callee_fndecl (gimple_call_fn (g));

get_callee_fndecl should not be needed in GIMPLE.  When we are
gimplifying we should set gimple_call_fn() to the right DECL (so we call
get_callee_fndecl only once in gimplify_call_expr).

> +	  if (fdecl)

This test should then become 'if (DECL_P (gimple_call_fn (g)))'


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