Re: [PATCH] add simple attribute introspection

2018-11-25 Thread Martin Sebor
On 11/25/18 7:11 AM, Rainer Orth wrote: Hi Martin, I'm seeing the same on sparc-sun-solaris2.11, plus +FAIL: c-c++-common/builtin-has-attribute-3.c -std=gnu++14 (test for excess errors) +FAIL: c-c++-common/builtin-has-attribute-3.c -std=gnu++17 (test for excess errors) +FAIL: c-c++-common/buil

Re: [PATCH] add simple attribute introspection

2018-11-25 Thread Rainer Orth
Hi Martin, >> I'm seeing the same on sparc-sun-solaris2.11, plus >> >> +FAIL: c-c++-common/builtin-has-attribute-3.c -std=gnu++14 (test for >> excess errors) >> +FAIL: c-c++-common/builtin-has-attribute-3.c -std=gnu++17 (test for >> excess errors) >> +FAIL: c-c++-common/builtin-has-attribute-3.c -

Re: [PATCH] add simple attribute introspection

2018-11-23 Thread Martin Sebor
On 11/22/18 6:09 AM, Rainer Orth wrote: Hi Christophe, On Sat, 10 Nov 2018 at 00:43, Martin Sebor wrote: On 11/09/2018 12:59 PM, Jeff Law wrote: On 10/31/18 10:27 AM, Martin Sebor wrote: Ping: https://gcc.gnu.org/ml/gcc-patches/2018-10/msg01473.html With the C++ bits approved I'm still lo

Re: [PATCH] add simple attribute introspection

2018-11-23 Thread Martin Sebor
On 11/22/18 5:28 AM, Christophe Lyon wrote: On Sat, 10 Nov 2018 at 00:43, Martin Sebor wrote: On 11/09/2018 12:59 PM, Jeff Law wrote: On 10/31/18 10:27 AM, Martin Sebor wrote: Ping: https://gcc.gnu.org/ml/gcc-patches/2018-10/msg01473.html With the C++ bits approved I'm still looking for a r

Re: [PATCH] add simple attribute introspection

2018-11-22 Thread Christophe Lyon
On Thu, 22 Nov 2018 at 14:09, Rainer Orth wrote: > > Hi Christophe, > > > On Sat, 10 Nov 2018 at 00:43, Martin Sebor wrote: > >> > >> On 11/09/2018 12:59 PM, Jeff Law wrote: > >> > On 10/31/18 10:27 AM, Martin Sebor wrote: > >> >> Ping: https://gcc.gnu.org/ml/gcc-patches/2018-10/msg01473.html > >

Re: [PATCH] add simple attribute introspection

2018-11-22 Thread Rainer Orth
Hi Christophe, > On Sat, 10 Nov 2018 at 00:43, Martin Sebor wrote: >> >> On 11/09/2018 12:59 PM, Jeff Law wrote: >> > On 10/31/18 10:27 AM, Martin Sebor wrote: >> >> Ping: https://gcc.gnu.org/ml/gcc-patches/2018-10/msg01473.html >> >> >> >> With the C++ bits approved I'm still looking for a revie

Re: [PATCH] add simple attribute introspection

2018-11-22 Thread Christophe Lyon
On Sat, 10 Nov 2018 at 00:43, Martin Sebor wrote: > > On 11/09/2018 12:59 PM, Jeff Law wrote: > > On 10/31/18 10:27 AM, Martin Sebor wrote: > >> Ping: https://gcc.gnu.org/ml/gcc-patches/2018-10/msg01473.html > >> > >> With the C++ bits approved I'm still looking for a review/approval > >> of the r

Re: [PATCH] add simple attribute introspection

2018-11-09 Thread Martin Sebor
On 11/09/2018 12:59 PM, Jeff Law wrote: On 10/31/18 10:27 AM, Martin Sebor wrote: Ping: https://gcc.gnu.org/ml/gcc-patches/2018-10/msg01473.html With the C++ bits approved I'm still looking for a review/approval of the remaining changes: the C front end and the shared c-family handling of the n

Re: [PATCH] add simple attribute introspection

2018-11-09 Thread Jeff Law
On 10/31/18 10:27 AM, Martin Sebor wrote: > Ping: https://gcc.gnu.org/ml/gcc-patches/2018-10/msg01473.html > > With the C++ bits approved I'm still looking for a review/approval > of the remaining changes: the C front end and the shared c-family > handling of the new built-in. I thought I acked th

Re: [PATCH] add simple attribute introspection

2018-10-31 Thread Martin Sebor
Ping: https://gcc.gnu.org/ml/gcc-patches/2018-10/msg01473.html With the C++ bits approved I'm still looking for a review/approval of the remaining changes: the C front end and the shared c-family handling of the new built-in. On 10/23/2018 04:08 PM, Martin Sebor wrote: On 10/22/2018 04:08 PM, J

Re: [PATCH] add simple attribute introspection

2018-10-24 Thread Jason Merrill
On 10/23/18 6:08 PM, Martin Sebor wrote: + if (cp_parser_parse_definitely (parser)) +{ + /* If all went well, set OPER to the type. */ + cp_decl_specifier_seq decl_specs; + + /* Build a trivial decl-specifier-seq. */ + clear_decl_specs (&decl_specs); + decl_specs.t

Re: [PATCH] add simple attribute introspection

2018-10-23 Thread Martin Sebor
On 10/22/2018 04:08 PM, Jason Merrill wrote: On 10/13/18 8:19 PM, Martin Sebor wrote: + oper = cp_parser_type_id (parser); + parser->in_type_id_in_expr_p = saved_in_type_id_in_expr_p; + + if (cp_parser_parse_definitely (parser)) +{ + /* If all went well, set OPER to the type. */ +

Re: [PATCH] add simple attribute introspection

2018-10-22 Thread Jason Merrill
On 10/13/18 8:19 PM, Martin Sebor wrote: + oper = cp_parser_type_id (parser); + parser->in_type_id_in_expr_p = saved_in_type_id_in_expr_p; + + if (cp_parser_parse_definitely (parser)) +{ + /* If all went well, set OPER to the type. */ + cp_decl_specifier_seq decl_specs; + +

Re: [PATCH] add simple attribute introspection

2018-10-22 Thread Martin Sebor
Jason, Do you have any suggestions for the C++ parts or are they good enough to commit (with the expectation that I'll add template handling later)? The last patch is here: https://gcc.gnu.org/ml/gcc-patches/2018-10/msg00811.html Martin On 10/16/2018 05:19 PM, Jeff Law wrote: On 10/13/18 6:

Re: [PATCH] add simple attribute introspection

2018-10-16 Thread Eric Gallager
On 10/13/18, Martin Sebor wrote: > Attached is an updated/enhanced patch with many more tests > and the suggested documentation tweak. It also restores > the handling of empty attributes that the first revision > inadvertently removed from the C parser. > > The tests are much more comprehensive n

Re: [PATCH] add simple attribute introspection

2018-10-16 Thread Jeff Law
On 10/13/18 6:19 PM, Martin Sebor wrote: > Attached is an updated/enhanced patch with many more tests > and the suggested documentation tweak.  It also restores > the handling of empty attributes that the first revision > inadvertently removed from the C parser. > > The tests are much more compreh

Re: [PATCH] add simple attribute introspection

2018-10-13 Thread Martin Sebor
Attached is an updated/enhanced patch with many more tests and the suggested documentation tweak. It also restores the handling of empty attributes that the first revision inadvertently removed from the C parser. The tests are much more comprehensive now but still not exhaustive. I have added w

Re: [PATCH] add simple attribute introspection

2018-10-11 Thread Eric Gallager
On 10/10/18, Martin Sebor wrote: > While writing tests for fixes and enhancements for attribute > handling I keep finding myself coming up with the same boiler- > plate code to verify whether an attribute has or has not been > successfully applied. It's often error-prone because it > depends on t

Re: [PATCH] add simple attribute introspection

2018-10-11 Thread Joseph Myers
On Thu, 11 Oct 2018, Martin Sebor wrote: > (Or are there some differences between the underscored forms and > the one without it)? They should always behave the same. > With a few exceptions (like aligned) the built-in returns false > for attributes that aren't attached to a node. I haven't exe

Re: [PATCH] add simple attribute introspection

2018-10-11 Thread Martin Sebor
On 10/11/2018 06:04 AM, Joseph Myers wrote: On Thu, 11 Oct 2018, Martin Sebor wrote: The attached patch introduces a built-in function called __builtin_has_attribute that makes some of this possible. See the documentation and tests for details. I see nothing in the documentation about handlin

Re: [PATCH] add simple attribute introspection

2018-10-11 Thread Joseph Myers
On Thu, 11 Oct 2018, Martin Sebor wrote: > The attached patch introduces a built-in function called > __builtin_has_attribute that makes some of this possible. > See the documentation and tests for details. I see nothing in the documentation about handling of equivalent forms of an attribute - f