This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[C++ PATCH] Remove useless tokens from cp_parser_linkage_specification (PR c++/87393)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]