This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C++ PATCH] Remove useless tokens from cp_parser_linkage_specification (PR c++/87393)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: David Malcolm <dmalcolm at redhat dot com>, Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 21 Nov 2018 16:59:36 +0100
- Subject: [C++ PATCH] Remove useless tokens from cp_parser_linkage_specification (PR c++/87393)
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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