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
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."
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
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.
>
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_
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
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: 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
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
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
10 matches
Mail list logo