Re: Suspicious code in fold-const.c

2016-01-26 Thread Jeff Law
On 01/22/2016 04:03 AM, Richard Biener wrote: My guess is this is probably suppose to be && ! VOID_TYPE_P (TREE_TYPE (TREE_OPERAND (tem, 1))) && ! VOID_TYPE_P (TREE_TYPE (TREE_OPERAND (tem, 2))) but I'm not sure. Any guesses whats intended here? Not sure, it might be to detect some of

Re: Suspicious code in fold-const.c

2016-01-26 Thread Jeff Law
On 01/22/2016 10:21 AM, Bernd Schmidt wrote: On 01/22/2016 02:37 PM, Andrew MacLeod wrote: /* If the initializer is non-void, then it's a normal expression that will be assigned to the slot. */ (*) if (!VOID_TYPE_P (t)) (*) return RECURSE (t); I suspect

Re: Suspicious code in fold-const.c

2016-01-22 Thread Richard Biener
On Fri, Jan 22, 2016 at 12:06 AM, Andrew MacLeod wrote: > I was trying the ttype prototype for static type checking on fold-const.c to > see how long it would take me to convert such a large file, and it choked on > this snippet of code in fold_unary_loc, around lines

Re: Suspicious code in fold-const.c

2016-01-22 Thread Bernd Schmidt
On 01/22/2016 02:37 PM, Andrew MacLeod wrote: /* If the initializer is non-void, then it's a normal expression that will be assigned to the slot. */ (*) if (!VOID_TYPE_P (t)) (*) return RECURSE (t); I suspect this should also be if

Re: Suspicious code in fold-const.c

2016-01-22 Thread Andrew MacLeod
On 01/22/2016 06:03 AM, Richard Biener wrote: On Fri, Jan 22, 2016 at 12:06 AM, Andrew MacLeod wrote: I was trying the ttype prototype for static type checking on fold-const.c to see how long it would take me to convert such a large file, and it choked on this snippet of

Suspicious code in fold-const.c

2016-01-21 Thread Andrew MacLeod
I was trying the ttype prototype for static type checking on fold-const.c to see how long it would take me to convert such a large file, and it choked on this snippet of code in fold_unary_loc, around lines 7690-7711: suspect code tagged with (*) if ((CONVERT_EXPR_CODE_P (code)