Re: [PATCH] underline null argument in -Wnonnull (PR c++/86568)

2020-07-04 Thread Andreas Schwab
On Jun 05 2020, Martin Sebor via Gcc-patches wrote: > --- /dev/null > +++ b/gcc/testsuite/g++.dg/warn/Wnonnull5.C > @@ -0,0 +1,108 @@ > +/* PR c++/86568 - -Wnonnull warnings should highlight the relevant argument > + not the closing parenthesis. > + { dg-do compile } > + { dg-options "-O2 -W

Re: [PATCH] underline null argument in -Wnonnull (PR c++/86568)

2020-06-30 Thread Andreas Schwab
This breaks a lot of tests due to the different error messages. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."

Re: [PATCH] underline null argument in -Wnonnull (PR c++/86568)

2020-06-29 Thread Martin Sebor via Gcc-patches
On 6/29/20 3:24 AM, Andreas Schwab wrote: This breaks bootstrap: In static member function 'static Expression* Type::type_descriptor(Gogo*, Type*)', inlined from 'virtual Expression* Named_type::do_type_descriptor(Gogo*, Named_type*)' at ../../gcc/go/gofrontend/types.cc:4:53, inl

Re: [PATCH] underline null argument in -Wnonnull (PR c++/86568)

2020-06-29 Thread Jakub Jelinek via Gcc-patches
On Fri, Jun 05, 2020 at 01:41:16PM -0600, Martin Sebor via Gcc-patches wrote: > PR c++/86568 - -Wnonnull warnings should highlight the relevant argument not > the closing parenthesis > > gcc/c-family/ChangeLog: > > PR c++/86568 > * c-common.c (struct nonnull_arg_ctx): Add members. >

Re: [PATCH] underline null argument in -Wnonnull (PR c++/86568)

2020-06-29 Thread Andreas Schwab
This breaks bootstrap: In static member function 'static Expression* Type::type_descriptor(Gogo*, Type*)', inlined from 'virtual Expression* Named_type::do_type_descriptor(Gogo*, Named_type*)' at ../../gcc/go/gofrontend/types.cc:4:53, inlined from 'virtual Expression* Named_type::do_

Re: [PING][PATCH] underline null argument in -Wnonnull (PR c++/86568)

2020-06-28 Thread Martin Sebor via Gcc-patches
On 6/26/20 3:58 PM, Jeff Law wrote: On Mon, 2020-06-22 at 12:02 -0600, Martin Sebor wrote: Ping: https://gcc.gnu.org/pipermail/gcc-patches/2020-June/547415.html Jason already approved the C++ changes (with a couple of minor tweaks). I'm still looking for an approval of the corresponding middle

Re: [PING][PATCH] underline null argument in -Wnonnull (PR c++/86568)

2020-06-26 Thread Jeff Law via Gcc-patches
On Mon, 2020-06-22 at 12:02 -0600, Martin Sebor wrote: > Ping: https://gcc.gnu.org/pipermail/gcc-patches/2020-June/547415.html > > Jason already approved the C++ changes (with a couple of minor > tweaks). I'm still looking for an approval of the corresponding > middle end diff. Do you need an aut

[PING][PATCH] underline null argument in -Wnonnull (PR c++/86568)

2020-06-22 Thread Martin Sebor via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2020-June/547415.html Jason already approved the C++ changes (with a couple of minor tweaks). I'm still looking for an approval of the corresponding middle end diff. On 6/5/20 1:41 PM, Martin Sebor wrote: The caret location C++ -Wnonnull warnings

Re: [PATCH] underline null argument in -Wnonnull (PR c++/86568)

2020-06-11 Thread Jason Merrill via Gcc-patches
On 6/5/20 3:41 PM, Martin Sebor wrote: + location_t loc += EXPR_HAS_LOCATION (param) ? EXPR_LOCATION (param) : pctx->loc; This could be EXPR_LOC_OR_LOC (param, pctx->loc) + location_t loc = (EXPR_HAS_LOCATION (ptr) + ? EXPR_LOCATION (ptr) : EXPR_LOCATION

[PATCH] underline null argument in -Wnonnull (PR c++/86568)

2020-06-05 Thread Martin Sebor via Gcc-patches
The caret location C++ -Wnonnull warnings is in the wrong place: either under the closing parenthesis of a call to a function declared nonnull, or under the whole call (when issued from the middle end). In addition, for member functions, the one-based argument number mentioned in the warning star