On Fri, 8 Aug 2025, Martin Uecker wrote:

> diff --git a/gcc/c/c-tree.h b/gcc/c/c-tree.h
> index bb0b113754e..372fcbd8aa1 100644
> --- a/gcc/c/c-tree.h
> +++ b/gcc/c/c-tree.h
> @@ -80,6 +80,11 @@ along with GCC; see the file COPYING3.  If not see
>  /* For a PARM_DECL, nonzero if it was declared as an array.  */
>  #define C_ARRAY_PARAMETER(NODE) DECL_LANG_FLAG_0 (NODE)
>  
> +/* For FUNCTION_DECLs, evaluates true if the decl is a nested
> +   function that requires a non-local context.  */
> +#define C_FUNC_NONLOCAL_CONTEXT(EXP)         \
> +  DECL_LANG_FLAG_4 (FUNCTION_DECL_CHECK (EXP))

Given that DECL_LANG_FLAG_4 is also used for C_DECL_REGISTER, I think 
C_DECL_REGISTER should be made to check (via TREE_NOT_CHECK) that it isn't 
used on a FUNCTION_DECL, to ensure the uses don't conflict.

-- 
Joseph S. Myers
josmy...@redhat.com

Reply via email to