[PATCH] avoid -Wnonnull on synthesized condition in static_cast (PR 96003)

2020-07-17 Thread Martin Sebor via Gcc-patches
The recent enhancement to treat the implicit this pointer argument as nonnull in member functions triggers spurious -Wnonnull for the synthesized conditional expression the C++ front end replaces the pointer with in some static_cast expressions. The front end already sets the no-warning bit for t

Re: [PATCH] avoid -Wnonnull on synthesized condition in static_cast (PR 96003)

2020-08-13 Thread Jeff Law via Gcc-patches
On Fri, 2020-07-17 at 13:00 -0600, Martin Sebor via Gcc-patches wrote: > The recent enhancement to treat the implicit this pointer argument > as nonnull in member functions triggers spurious -Wnonnull for > the synthesized conditional expression the C++ front end replaces > the pointer with in some

Re: [PATCH] avoid -Wnonnull on synthesized condition in static_cast (PR 96003)

2020-07-23 Thread Martin Sebor via Gcc-patches
Another test case added to the bug since I posted the patch shows that the no-warning bit set by the C++ front end is easily lost during early folding, triggering the -Wnonull again despite the suppression. The attached revision tweaks the folder in just this one case to let the suppression take

Re: [PATCH] avoid -Wnonnull on synthesized condition in static_cast (PR 96003)

2020-07-29 Thread Jason Merrill via Gcc-patches
On 7/23/20 3:08 PM, Martin Sebor wrote: Another test case added to the bug since I posted the patch shows that the no-warning bit set by the C++ front end is easily lost during early folding, triggering the -Wnonull again despite the suppression.  The attached revision tweaks the folder in just t

Re: [PATCH] avoid -Wnonnull on synthesized condition in static_cast (PR 96003)

2020-07-30 Thread Martin Sebor via Gcc-patches
On 7/29/20 2:27 PM, Jason Merrill wrote: On 7/23/20 3:08 PM, Martin Sebor wrote: Another test case added to the bug since I posted the patch shows that the no-warning bit set by the C++ front end is easily lost during early folding, triggering the -Wnonull again despite the suppression.  The att

Re: [PATCH] avoid -Wnonnull on synthesized condition in static_cast (PR 96003)

2020-07-30 Thread Jason Merrill via Gcc-patches
On 7/30/20 12:25 PM, Martin Sebor wrote: On 7/29/20 2:27 PM, Jason Merrill wrote: On 7/23/20 3:08 PM, Martin Sebor wrote: Another test case added to the bug since I posted the patch shows that the no-warning bit set by the C++ front end is easily lost during early folding, triggering the -Wnonu

Re: [PATCH] avoid -Wnonnull on synthesized condition in static_cast (PR 96003)

2020-07-31 Thread Martin Sebor via Gcc-patches
On 7/30/20 1:47 PM, Jason Merrill wrote: On 7/30/20 12:25 PM, Martin Sebor wrote: On 7/29/20 2:27 PM, Jason Merrill wrote: On 7/23/20 3:08 PM, Martin Sebor wrote: Another test case added to the bug since I posted the patch shows that the no-warning bit set by the C++ front end is easily lost d