Patch to fix 'set but not used' in assign_parms_initialize_all
Richard Guenther
richard.guenther@gmail.com
Sun Apr 11 18:38:00 GMT 2010
On Fri, Apr 9, 2010 at 6:12 PM, <sje@cup.hp.com> wrote:
>
> Depending on what a platform has for INIT_CUMULATIVE_INCOMING_ARGS
> (or INIT_CUMULATIVE_ARGS), fntype in assign_parms_initialize_all
> may not be used. In that case we not get a 'set but not used'
> error during bootstrap. I am seeing this on IA64 and PA where
> INIT_CUMULATIVE_INCOMING_ARGS is defined as a code fragement macro that
> does not reference fntype.
>
> This patch adds the unused attribute to fntype, if this isn't acceptable
> I suppose I could change IA64 and PA to make INIT_CUMULATIVE_INCOMING_ARGS
> a function call that 'uses' fntype or I could add a bogus use of fntype but
> this seems like the simplest fix.
>
> Tested on IA64 HP-UX, ok for checkin?
That doesn't work for non-GCC host compilers.
Richard.
> Steve Ellcey
> sje@cup.hp.com
>
>
> 2010-04-09 Steve Ellcey <sje@cup.hp.com>
>
> * function.c (assign_parms_initialize_all): Add unused attribute
> to fntype.
>
>
> Index: function.c
> ===================================================================
> --- function.c (revision 158145)
> +++ function.c (working copy)
> @@ -2066,7 +2066,7 @@ struct assign_parm_data_one
> static void
> assign_parms_initialize_all (struct assign_parm_data_all *all)
> {
> - tree fntype;
> + tree fntype __attribute__ ((unused));
>
> memset (all, 0, sizeof (*all));
>
>
More information about the Gcc-patches
mailing list