* [C++ PATCH] Remove useless tokens from cp_parser_linkage_specification (PR c++/87393)
@ 2018-11-21 15:59 Jakub Jelinek
2018-11-21 16:35 ` David Malcolm
2018-11-21 18:38 ` Jason Merrill
0 siblings, 2 replies; 3+ messages in thread
From: Jakub Jelinek @ 2018-11-21 15:59 UTC (permalink / raw)
To: David Malcolm, Jason Merrill; +Cc: gcc-patches
Hi!
David's r251026 change added a weird trailing ->location.
It doesn't seem to be useful for anything, matching_braces has its own code
to track locations, so no need to do anything in the caller (and no other
spot does something like that).
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
2018-11-21 Jakub Jelinek <jakub@redhat.com>
PR c++/87393
* parser.c (cp_parser_linkage_specification): Remove useless
dereference of the consume_open method result.
--- gcc/cp/parser.c.jj 2018-11-21 08:58:56.190250827 +0100
+++ gcc/cp/parser.c 2018-11-21 10:02:40.690687576 +0100
@@ -14223,7 +14223,7 @@ cp_parser_linkage_specification (cp_pars
/* Consume the `{' token. */
matching_braces braces;
- braces.consume_open (parser)->location;
+ braces.consume_open (parser);
/* Parse the declarations. */
cp_parser_declaration_seq_opt (parser);
/* Look for the closing `}'. */
Jakub
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [C++ PATCH] Remove useless tokens from cp_parser_linkage_specification (PR c++/87393)
2018-11-21 15:59 [C++ PATCH] Remove useless tokens from cp_parser_linkage_specification (PR c++/87393) Jakub Jelinek
@ 2018-11-21 16:35 ` David Malcolm
2018-11-21 18:38 ` Jason Merrill
1 sibling, 0 replies; 3+ messages in thread
From: David Malcolm @ 2018-11-21 16:35 UTC (permalink / raw)
To: Jakub Jelinek, Jason Merrill; +Cc: gcc-patches
On Wed, 2018-11-21 at 16:59 +0100, Jakub Jelinek wrote:
> Hi!
>
> David's r251026 change added a weird trailing ->location.
> It doesn't seem to be useful for anything, matching_braces has its
> own code
> to track locations, so no need to do anything in the caller (and no
> other
> spot does something like that).
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> 2018-11-21 Jakub Jelinek <jakub@redhat.com>
>
> PR c++/87393
> * parser.c (cp_parser_linkage_specification): Remove useless
> dereference of the consume_open method result.
>
> --- gcc/cp/parser.c.jj 2018-11-21 08:58:56.190250827 +0100
> +++ gcc/cp/parser.c 2018-11-21 10:02:40.690687576 +0100
> @@ -14223,7 +14223,7 @@ cp_parser_linkage_specification (cp_pars
>
> /* Consume the `{' token. */
> matching_braces braces;
> - braces.consume_open (parser)->location;
> + braces.consume_open (parser);
> /* Parse the declarations. */
> cp_parser_declaration_seq_opt (parser);
> /* Look for the closing `}'. */
Oops; looks like a stray edit by me.
Thanks for catching this; OK to remove it.
Dave
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [C++ PATCH] Remove useless tokens from cp_parser_linkage_specification (PR c++/87393)
2018-11-21 15:59 [C++ PATCH] Remove useless tokens from cp_parser_linkage_specification (PR c++/87393) Jakub Jelinek
2018-11-21 16:35 ` David Malcolm
@ 2018-11-21 18:38 ` Jason Merrill
1 sibling, 0 replies; 3+ messages in thread
From: Jason Merrill @ 2018-11-21 18:38 UTC (permalink / raw)
To: Jakub Jelinek, David Malcolm; +Cc: gcc-patches
On 11/21/18 10:59 AM, Jakub Jelinek wrote:
> Hi!
>
> David's r251026 change added a weird trailing ->location.
> It doesn't seem to be useful for anything, matching_braces has its own code
> to track locations, so no need to do anything in the caller (and no other
> spot does something like that).
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
OK.
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-21 18:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-21 15:59 [C++ PATCH] Remove useless tokens from cp_parser_linkage_specification (PR c++/87393) Jakub Jelinek
2018-11-21 16:35 ` David Malcolm
2018-11-21 18:38 ` Jason Merrill
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).