Re: [PATCH 005/236] Introduce as_a_nullable

2014-08-18 Thread David Malcolm
On Wed, 2014-08-13 at 07:48 -0600, Jeff Law wrote: On 08/13/14 04:07, Richard Biener wrote: On Wed, Aug 13, 2014 at 12:01 PM, Martin Jambor mjam...@suse.cz wrote: Hi, On Wed, Aug 06, 2014 at 01:19:44PM -0400, David Malcolm wrote: In many circumstances, is_a_helper T::test assumes that

Re: [PATCH 005/236] Introduce as_a_nullable

2014-08-13 Thread Martin Jambor
Hi, On Wed, Aug 06, 2014 at 01:19:44PM -0400, David Malcolm wrote: In many circumstances, is_a_helper T::test assumes that the pointer is non-NULL, but sometimes you have a pointer of type T that can be NULL. Earlier versions of this patch kit made numerous uses of the ternary operator to

Re: [PATCH 005/236] Introduce as_a_nullable

2014-08-13 Thread Richard Biener
On Wed, Aug 13, 2014 at 12:01 PM, Martin Jambor mjam...@suse.cz wrote: Hi, On Wed, Aug 06, 2014 at 01:19:44PM -0400, David Malcolm wrote: In many circumstances, is_a_helper T::test assumes that the pointer is non-NULL, but sometimes you have a pointer of type T that can be NULL. Earlier

Re: [PATCH 005/236] Introduce as_a_nullable

2014-08-13 Thread Jeff Law
On 08/13/14 04:07, Richard Biener wrote: On Wed, Aug 13, 2014 at 12:01 PM, Martin Jambor mjam...@suse.cz wrote: Hi, On Wed, Aug 06, 2014 at 01:19:44PM -0400, David Malcolm wrote: In many circumstances, is_a_helper T::test assumes that the pointer is non-NULL, but sometimes you have a pointer

Re: [PATCH 005/236] Introduce as_a_nullable

2014-08-13 Thread David Malcolm
On Wed, 2014-08-13 at 12:07 +0200, Richard Biener wrote: On Wed, Aug 13, 2014 at 12:01 PM, Martin Jambor mjam...@suse.cz wrote: Hi, On Wed, Aug 06, 2014 at 01:19:44PM -0400, David Malcolm wrote: In many circumstances, is_a_helper T::test assumes that the pointer is non-NULL, but

Re: [PATCH 005/236] Introduce as_a_nullable

2014-08-12 Thread Jeff Law
On 08/06/14 11:19, David Malcolm wrote: In many circumstances, is_a_helper T::test assumes that the pointer is non-NULL, but sometimes you have a pointer of type T that can be NULL. Earlier versions of this patch kit made numerous uses of the ternary operator to handle nullable pointers e.g.:

[PATCH 005/236] Introduce as_a_nullable

2014-08-06 Thread David Malcolm
In many circumstances, is_a_helper T::test assumes that the pointer is non-NULL, but sometimes you have a pointer of type T that can be NULL. Earlier versions of this patch kit made numerous uses of the ternary operator to handle nullable pointers e.g.: return insn ? as_a rtx_insn * (insn) :