Re: [C++ preview patch] PR 44277

2011-10-31 Thread Paolo Carlini
On 10/31/2011 09:29 PM, Jason Merrill wrote: On 10/31/2011 04:09 PM, Paolo Carlini wrote: ... so today I noticed the c_inhibit_evaluation_warnings use in cp_convert_and_check and occurred to me that we could use the existing mechanism for this warning too? The below still passes checking and my

Re: [C++ preview patch] PR 44277

2011-10-31 Thread Jason Merrill
On 10/31/2011 04:09 PM, Paolo Carlini wrote: ... so today I noticed the c_inhibit_evaluation_warnings use in cp_convert_and_check and occurred to me that we could use the existing mechanism for this warning too? The below still passes checking and my small set of tests... I notice that this pa

Re: [C++ preview patch] PR 44277

2011-10-31 Thread Paolo Carlini
... so today I noticed the c_inhibit_evaluation_warnings use in cp_convert_and_check and occurred to me that we could use the existing mechanism for this warning too? The below still passes checking and my small set of tests... What do you think? Thanks, Paolo. // Ind

Re: [C++ preview patch] PR 44277

2011-10-31 Thread Paolo Carlini
Hi, How does it work to warn in convert_like_real instead? the problem is that (expr, totype) can be a lot of different things for which we want to warn, can be a zero and a pointer for assignments, but, when totype is a BOOLEAN_TYPE expr can be an EQ_EXPR or NEQ_EXPR and then the operands var

Re: [C++ preview patch] PR 44277

2011-10-31 Thread Jason Merrill
How does it work to warn in convert_like_real instead? Jason

Re: [C++ preview patch] PR 44277

2011-10-30 Thread Paolo Carlini
... this is another option: use an 'integer_zero_or_nullptr_node (tree)' defined differently for C and C++. Certainly the whole thing becomes smaller. Paolo. Index: c-family/c.opt === --- c-family/c.opt (revi