Re: [PATCH] avoid passing expressions to decl_attributes [PR94346]

2020-03-27 Thread Martin Sebor via Gcc-patches
On 3/27/20 3:55 AM, Jakub Jelinek wrote: On Thu, Mar 26, 2020 at 07:55:39PM -0600, Martin Sebor via Gcc-patches wrote: --- a/gcc/c-family/c-attribs.c +++ b/gcc/c-family/c-attribs.c @@ -2526,17 +2526,21 @@ handle_copy_attribute (tree *node, tree name, tree args, && !FUNCTION_POINTER_TYPE_

Re: [PATCH] avoid passing expressions to decl_attributes [PR94346]

2020-03-27 Thread Jakub Jelinek via Gcc-patches
On Thu, Mar 26, 2020 at 07:55:39PM -0600, Martin Sebor via Gcc-patches wrote: > --- a/gcc/c-family/c-attribs.c > +++ b/gcc/c-family/c-attribs.c > @@ -2526,17 +2526,21 @@ handle_copy_attribute (tree *node, tree name, tree > args, >&& !FUNCTION_POINTER_TYPE_P (TREE_TYPE (ref))) > ref =

[PATCH] avoid passing expressions to decl_attributes [PR94346]

2020-03-26 Thread Martin Sebor via Gcc-patches
Attribute copy can be invoked with an expression argument to copy from the expression's type. However, it must avoid passing the expression as the last (optional) argument to decl_attributes because the function is only prepared to deal with DECLs and types. The attached patch passes null as the