On 8/30/19 4:09 AM, Jozef Lawrynowicz wrote:
> The attached patch adds a new target hook "TARGET_HANDLE_GENERIC_ATTRIBUTE"
> which enables a back end to perform additional processing of an attribute that
> is normally handled by a front end.
> 
> So far only the "section" and "noinit" attribute make use of this hook, as the
> msp430 back end requires additional attribute conflict checking to be 
> performed
> on these generic attributes.
> 
> 
> 0001-Implement-TARGET_HANDLE_GENERIC_ATTRIBUTE.patch
> 
> From e693da709114df378e2ea8b1d3729b105c99a495 Mon Sep 17 00:00:00 2001
> From: Jozef Lawrynowicz <joze...@mittosystems.com>
> Date: Wed, 28 Aug 2019 14:09:20 +0100
> Subject: [PATCH 1/3] Implement TARGET_HANDLE_GENERIC_ATTRIBUTE
> 
> gcc/ChangeLog:
> 
> 2019-08-29  Jozef Lawrynowicz  <joze...@mittosystems.com>
> 
>       * config/msp430/msp430.c (TARGET_HANDLE_GENERIC_ATTRIBUTE): Define.
>       (msp430_handle_generic_attribute): New function.
>       * doc/tm.texi: Regenerate.
>       * doc/tm.texi.in: Add TARGET_HANDLE_GENERIC_ATTRIBUTE.
>       * hooks.c (hook_tree_treeptr_tree_tree_int_boolptr_null): New.
>       * hooks.h (hook_tree_treeptr_tree_tree_int_boolptr_null): New.
>       * target.def: Define new hook TARGET_HANDLE_GENERIC_ATTRIBUTE.
> 
> gcc/c-family/ChangeLog:
> 
> 2019-08-29  Jozef Lawrynowicz  <joze...@mittosystems.com>
> 
>       * c-attribs.c (handle_section_attribute): Call the
>       handle_generic_attribute target hook after performing target
>       independent processing.
>       (handle_noinit_attribute): Likewise.
Just a nit.  In a couple places in c-attribs.c you have:

> +  if (!(* no_add_attrs))

Drop the whitespace between the * and no_add_attrs.

OK with that change.

jeff

Reply via email to