c++: Fux strncmp last argument in dump_decl_name [PR93641]
authorJakub Jelinek <jakub@redhat.com>
Mon, 10 Feb 2020 14:04:55 +0000 (15:04 +0100)
committerJakub Jelinek <jakub@redhat.com>
Mon, 10 Feb 2020 14:04:55 +0000 (15:04 +0100)
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.

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

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

gcc/cp/ChangeLog
gcc/cp/error.c

index 876e2ebf987063f6945fe1678afed0e6e92c4ec0..a8b447b57402800f0115905c63a4856f0975124f 100644 (file)
@@ -1,3 +1,8 @@
+2020-02-10  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/93641
+       * error.c (dump_decl_name): Fix up last argument to strncmp.
+
 2020-02-10  Jason Merrill  <jason@redhat.com>
 
        PR c++/93618
index ab8638fbaec638cfaacb08edb78aa4e12bd31178..8ec1653d87a88b758048248f0fcaa30043067ed7 100644 (file)
@@ -1098,7 +1098,7 @@ dump_decl_name (cxx_pretty_printer *pp, tree t, int flags)
     }
 
   const char *str = IDENTIFIER_POINTER (t);
-  if (!strncmp (str, "_ZGR", 3))
+  if (!strncmp (str, "_ZGR", 4))
     {
       pp_cxx_ws_string (pp, "<temporary>");
       return;