Re: Add null identifiers to genmatch

2015-11-17 Thread Richard Biener
On Tue, Nov 17, 2015 at 12:14 AM, Mike Stump wrote: > On Nov 16, 2015, at 1:52 PM, Richard Sandiford wrote: >> >> Yeah. Kenny was adamant that for wide-int we should have an UNSIGNED/SIGNED > > Yeah, you can blame me. I think (, UNSIGNED) conveys more than (,true) or > (,false). The sad part

Re: Add null identifiers to genmatch

2015-11-16 Thread Mike Stump
On Nov 16, 2015, at 1:52 PM, Richard Sandiford wrote: > > Yeah. Kenny was adamant that for wide-int we should have an UNSIGNED/SIGNED Yeah, you can blame me. I think (, UNSIGNED) conveys more than (,true) or (,false). The sad part is, this has always been true. > enum rather than a boolean

Re: Add null identifiers to genmatch

2015-11-16 Thread Richard Sandiford
Jeff Law writes: Boolean params are best avoided if possible, IMO. In this case, it seems this could instead be a new wrapper function, like: >>> This hasn't been something we've required for GCC.I've come across >>> this recommendation a few times over the last several months as I

Re: Add null identifiers to genmatch

2015-11-16 Thread Jeff Law
On 11/16/2015 01:15 PM, Pedro Alves wrote: Hi Jeff, (Sorry I didn't reply sooner, I was OOO.) No worries. Boolean params are best avoided if possible, IMO. In this case, it seems this could instead be a new wrapper function, like: This hasn't been something we've required for GCC.I've

Re: Add null identifiers to genmatch

2015-11-16 Thread Pedro Alves
Hi Jeff, (Sorry I didn't reply sooner, I was OOO.) On 11/08/2015 11:17 PM, Jeff Law wrote: > On 11/07/2015 07:31 AM, Pedro Alves wrote: >> Hi Richard, >> >> Passerby comment below. >> >> On 11/07/2015 01:21 PM, Richard Sandiford wrote: >>> -/* Lookup the identifier ID. */ >>> +/* Lookup the iden

Re: Add null identifiers to genmatch

2015-11-09 Thread Richard Biener
On Mon, Nov 9, 2015 at 12:17 AM, Jeff Law wrote: > On 11/07/2015 07:31 AM, Pedro Alves wrote: >> >> Hi Richard, >> >> Passerby comment below. >> >> On 11/07/2015 01:21 PM, Richard Sandiford wrote: >>> >>> -/* Lookup the identifier ID. */ >>> +/* Lookup the identifier ID. Allow "null" if ALLOW_NU

Re: Add null identifiers to genmatch

2015-11-08 Thread Jeff Law
On 11/07/2015 07:31 AM, Pedro Alves wrote: Hi Richard, Passerby comment below. On 11/07/2015 01:21 PM, Richard Sandiford wrote: -/* Lookup the identifier ID. */ +/* Lookup the identifier ID. Allow "null" if ALLOW_NULL. */ id_base * -get_operator (const char *id) +get_operator (const char

Re: Add null identifiers to genmatch

2015-11-07 Thread Pedro Alves
Hi Richard, Passerby comment below. On 11/07/2015 01:21 PM, Richard Sandiford wrote: > -/* Lookup the identifier ID. */ > +/* Lookup the identifier ID. Allow "null" if ALLOW_NULL. */ > > id_base * > -get_operator (const char *id) > +get_operator (const char *id, bool allow_null = false) >

Add null identifiers to genmatch

2015-11-07 Thread Richard Sandiford
This patch adds a null identifier that can never match anything and can never be generated. It is only valid in operator lists and fors. Later patches will add uses of it. The idea is to allow operator lists for maths functions that have four entries: - float built-in - double built-in - long do