Re: [C/C++ PATCH] Fix a -Waddress regression (PR c/69768)

2016-02-11 Thread Jason Merrill
On 02/11/2016 02:44 PM, Jakub Jelinek wrote: Hi! On Thu, Feb 11, 2016 at 01:56:09PM -0500, Jason Merrill wrote: On 02/11/2016 11:25 AM, Jakub Jelinek wrote: + && !integer_zerop (tree_strip_nop_conversions (op1))) Maybe cp_fold rather than tree_strip_nop_conversions? Is it safe

Re: [C/C++ PATCH] Fix a -Waddress regression (PR c/69768)

2016-02-11 Thread Marek Polacek
On Thu, Feb 11, 2016 at 08:44:24PM +0100, Jakub Jelinek wrote: > Hi! > > On Thu, Feb 11, 2016 at 01:56:09PM -0500, Jason Merrill wrote: > > On 02/11/2016 11:25 AM, Jakub Jelinek wrote: > > >+ && !integer_zerop (tree_strip_nop_conversions (op1))) > > > > Maybe cp_fold rather than tree_stri

Re: [C/C++ PATCH] Fix a -Waddress regression (PR c/69768)

2016-02-11 Thread Jakub Jelinek
Hi! On Thu, Feb 11, 2016 at 01:56:09PM -0500, Jason Merrill wrote: > On 02/11/2016 11:25 AM, Jakub Jelinek wrote: > >+ && !integer_zerop (tree_strip_nop_conversions (op1))) > > Maybe cp_fold rather than tree_strip_nop_conversions? Is it safe to call cp_fully_fold (typeck.c only calls i

Re: [C/C++ PATCH] Fix a -Waddress regression (PR c/69768)

2016-02-11 Thread Jason Merrill
On 02/11/2016 11:25 AM, Jakub Jelinek wrote: + && !integer_zerop (tree_strip_nop_conversions (op1))) Maybe cp_fold rather than tree_strip_nop_conversions? Jason

[C/C++ PATCH] Fix a -Waddress regression (PR c/69768)

2016-02-11 Thread Jakub Jelinek
Hi! Until recently, integer_zerop would STRIP_NOPS, so that change regressed some cases in the -Waddress warning that affect some real-world code. The following patch re-adds stripping of nops for that case (but doesn't try to fold it further). With this patch, for C and C++98 we get the same beha