diff mbox series

[committed] c++: Fix strncmp last argument in dump_decl_name [PR93641]

Message ID 20200210140905.GO17695@tucnak
State New
Headers show
Series [committed] c++: Fix strncmp last argument in dump_decl_name [PR93641] | expand

Commit Message

Jakub Jelinek Feb. 10, 2020, 2:09 p.m. UTC
Hi!

I'm not aware of symbols starting with _ZG that don't start with _ZGR
prefix, but perhaps in the future there might be some.

Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux,
committed to trunk as obvious.

2020-02-10  Jakub Jelinek  <jakub@redhat.com>

	PR other/93641
	* error.c (dump_decl_name): Fix up last argument to strncmp.



	Jakub
diff mbox series

Patch

--- gcc/cp/error.c.jj	2020-02-08 10:58:28.450865914 +0100
+++ gcc/cp/error.c	2020-02-10 09:39:48.207008572 +0100
@@ -1098,7 +1098,7 @@  dump_decl_name (cxx_pretty_printer *pp,
     }
 
   const char *str = IDENTIFIER_POINTER (t);
-  if (!strncmp (str, "_ZGR", 3))
+  if (!strncmp (str, "_ZGR", 4))
     {
       pp_cxx_ws_string (pp, "<temporary>");
       return;