This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tuples] start c_gimple_diagnostics_recursively conversion
- From: Diego Novillo <dnovillo at google dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: amacleod at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Tue, 24 Jul 2007 08:17:35 -0400
- Subject: Re: [tuples] start c_gimple_diagnostics_recursively conversion
- References: <20070723154920.GA12960@redhat.com> <20070723225850.GA6284@redhat.com>
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)))'