Re: [PATCH] improve validation of attribute arguments (PR c/78666)

2020-08-24 Thread Aldy Hernandez via Gcc-patches
Attached is another revision of this patch with the new helper function you suggested.  Is this version okay to commit? I don't actually have the ability to grant check-in in this area. I just figured that implementing some of these suggestions might make it more palatable to reviewers who do

Re: [PATCH] improve validation of attribute arguments (PR c/78666)

2020-08-24 Thread Martin Sebor via Gcc-patches
On 8/24/20 4:59 AM, Aldy Hernandez wrote: On 8/21/20 1:37 AM, Martin Sebor wrote: On 8/20/20 3:00 PM, Aldy Hernandez wrote: Regardless, here are some random comments. Thanks for the careful review! diff --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c index 37214831538..bc4f4

Re: [PATCH] improve validation of attribute arguments (PR c/78666)

2020-08-24 Thread Aldy Hernandez via Gcc-patches
On 8/21/20 1:37 AM, Martin Sebor wrote: On 8/20/20 3:00 PM, Aldy Hernandez wrote: Regardless, here are some random comments. Thanks for the careful review! diff --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c index 37214831538..bc4f409e346 100644 --- a/gcc/c-family/c-attribs

Re: [PATCH] improve validation of attribute arguments (PR c/78666)

2020-08-20 Thread Martin Sebor via Gcc-patches
On 8/20/20 3:00 PM, Aldy Hernandez wrote: First, didn't Marek say in the PR that the diagnostic code should go in diagnose_mismatched_attributes? My understanding of the structure of the attribute handling code is that with just a few exceptions, for C and C++ it's pretty much all in c-attribs.

Re: [PATCH] improve validation of attribute arguments (PR c/78666)

2020-08-20 Thread Aldy Hernandez via Gcc-patches
First, didn't Marek say in the PR that the diagnostic code should go in diagnose_mismatched_attributes? An overall comment-- could we write a generic validator rather than having to special case validation on a case by case basis? Is there way of marking attributes as immutable if specified o