Re: Sharing gdb's enum-flags.h with gcc? (was Re: [PATCH 01/10] Convert dump and optgroup flags to enums)

2018-06-05 Thread Richard Biener
On June 5, 2018 4:49:21 PM GMT+02:00, David Malcolm wrote: >On Tue, 2018-06-05 at 04:40 -0400, Trevor Saunders wrote: >> On Fri, Jun 01, 2018 at 12:00:09PM +0200, Richard Biener wrote: >> > On Tue, May 29, 2018 at 10:32 PM David Malcolm > > > wrote: >> > > >> > > The dump machinery uses "int" in

Re: Sharing gdb's enum-flags.h with gcc? (was Re: [PATCH 01/10] Convert dump and optgroup flags to enums)

2018-06-05 Thread Pedro Alves
On 06/05/2018 03:49 PM, David Malcolm wrote: > On Tue, 2018-06-05 at 04:40 -0400, Trevor Saunders wrote: >> You may want to look at gdb's enum-flags.h which I think already >> implements what your doing here. > > Aha! Thanks! > > Browsing the git web UI, that gdb header was introduced by Pedro

Sharing gdb's enum-flags.h with gcc? (was Re: [PATCH 01/10] Convert dump and optgroup flags to enums)

2018-06-05 Thread David Malcolm
On Tue, 2018-06-05 at 04:40 -0400, Trevor Saunders wrote: > On Fri, Jun 01, 2018 at 12:00:09PM +0200, Richard Biener wrote: > > On Tue, May 29, 2018 at 10:32 PM David Malcolm > > wrote: > > > > > > The dump machinery uses "int" in a few places, for two different > > > sets of bitmasks. > > > >

Re: [PATCH 01/10] Convert dump and optgroup flags to enums

2018-06-05 Thread Trevor Saunders
On Fri, Jun 01, 2018 at 12:00:09PM +0200, Richard Biener wrote: > On Tue, May 29, 2018 at 10:32 PM David Malcolm wrote: > > > > The dump machinery uses "int" in a few places, for two different > > sets of bitmasks. > > > > This patch makes things more self-documenting and type-safe by using > > a

Re: [PATCH 01/10] Convert dump and optgroup flags to enums

2018-06-01 Thread Richard Biener
On Tue, May 29, 2018 at 10:32 PM David Malcolm wrote: > > The dump machinery uses "int" in a few places, for two different > sets of bitmasks. > > This patch makes things more self-documenting and type-safe by using > a new pair of enums: one for the dump_flags_t and another for the >

[PATCH 01/10] Convert dump and optgroup flags to enums

2018-05-29 Thread David Malcolm
The dump machinery uses "int" in a few places, for two different sets of bitmasks. This patch makes things more self-documenting and type-safe by using a new pair of enums: one for the dump_flags_t and another for the optgroup_flags. This requires adding some overloaded bit operations to the