+2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
+
+       PR PR c++/70182
+       * cp-demangle.c (d_unqualified_name): Handle "on" for
+       operator names.
+       * testsuite/demangle-expected: Add tests.
+
+2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
+
+       PR c++/77489
+       * cp-demangle.c (d_discriminator): Handle discriminator >= 10.
+       * testsuite/demangle-expected: Add tests for discriminator.
+
+2017-01-04  Jakub Jelinek  <jakub@redhat.com>
+
+       Update copyright years.
+
 2017-01-04  Alan Modra  <amodra@gmail.com>
 
-       Sync with gcc.
+       * Makefile.in (configure_deps): Update.
+       * configure: Regenerate.
+
+2016-12-13  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/78761
+       * cp-demangle.c (cplus_demangle_type): Demangle Dc as decltype(auto).
+       * testsuite/demangle-expected: Add test for decltype(auto).
 
 2016-12-12  Nathan Sidwell  <nathan@acm.org>
 
        is_lambda_arg.
        <DEMANGLE_COMPONENT_LAMBDA>: Increment is_lambda_arg around arg
        printing.
-       * testsuite/demangle-expected: Add lambda auto mangling cases.
-
-2016-12-08  Alan Modra  <amodra@gmail.com>
-
-       * configure: Regenerate.
+       * testsuite/demangle-expected: Add lambda auto mangling cases. 
 
 2016-12-06  DJ Delorie  <dj@redhat.com>
 
        * argv.c (expandargv): Check for directories passed as @-files.
 
+2016-11-30  David Malcolm  <dmalcolm@redhat.com>
+
+       PR c/78498
+       * strndup.c (strlen): Delete decl.
+       (strnlen): Add decl.
+       (strndup): Call strnlen rather than strlen.
+       * xstrndup.c (xstrndup): Likewise.
+
+2016-11-29  Nathan Sidwell  <nathan@acm.org>
+
+       * cp-demangle.c (d_print_comp_inner): Fix parameter indentation.
+
 2016-11-03  David Tolnay <dtolnay@gmail.com>
            Mark Wielaard  <mark@klomp.org>
 
        * cplus-dem.c (ada_demangle): Initialize demangled to NULL and
        XDELETEVEC demangled when unknown.
 
-2016-10-17  Nick Clifton  <nickc@redhat.com>
-
-       * Sync with gcc.
-
 2016-09-19  Andrew Stubbs  <ams@codesourcery.com>
 
        * pex-win32.c (argv_to_cmdline): Quote zero-length parameters.
        (d_print_mod_list, d_print_mod, d_print_function_type)
        (is_ctor_or_dtor): Handle DEMANGLE_COMPONENT_TRANSACTION_SAFE.
 
-2015-09-30  Nick Clifton  <nickc@redhat.com>
-
-       Import the following patches from the GCC mainline:
-
-       2015-08-15  Ian Lance Taylor  <iant@google.com>
+2015-08-15  Ian Lance Taylor  <iant@google.com>
 
        * cp-demangle.c (d_abi_tags): Preserve di->last_name across any
        ABI tags.
        * testsuite/d-demangle-expected: Update float and complex literal
        tests to check correct hexadecimal demangling.
 
-2015-07-14  H.J. Lu  <hongjiu.lu@intel.com>
-
-       * configure: Regenerated.
-
 2015-07-13  Mikhail Maltsev  <maltsevm@gmail.com>
 
        * cp-demangle.c (d_dump): Fix syntax error.
        * functions.texi: Regenerate.
 
 2014-12-11  Uros Bizjak  <ubizjak@gmail.com>
-           Ben Elliston  <bje@au.ibm.com>
-           Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
+            Ben Elliston  <bje@au.ibm.com>
+            Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
 
        * xvasprintf.c: New file.
        * vprintf-support.h: Likewise.
        (d_ctor_dtor_name): Handle unified ctor/dtor.
 
 2013-11-22  Cary Coutant  <ccoutant@google.com>
-
+    
        PR other/59195
        * cp-demangle.c (struct d_info_checkpoint): New struct.
        (struct d_print_info): Add current_template field.
 
     ret = d_source_name (di);
   else if (IS_LOWER (peek))
     {
+      if (peek == 'o' && d_peek_next_char (di) == 'n')
+       d_advance (di, 2);
       ret = d_operator_name (di);
       if (ret != NULL && ret->type == DEMANGLE_COMPONENT_OPERATOR)
        {
     }
 }
 
-/* <discriminator> ::= _ <(non-negative) number>
+/* <discriminator> ::= _ <number>    # when number < 10
+                   ::= __ <number> _ # when number >= 10
+
+   <discriminator> ::= _ <number>    # when number >=10
+   is also accepted to support gcc versions that wrongly mangled that way.
 
    We demangle the discriminator, but we don't print it out.  FIXME:
    We should print it out in verbose mode.  */
 static int
 d_discriminator (struct d_info *di)
 {
-  int discrim;
+  int discrim, num_underscores = 1;
 
   if (d_peek_char (di) != '_')
     return 1;
   d_advance (di, 1);
+  if (d_peek_char (di) == '_')
+    {
+      ++num_underscores;
+      d_advance (di, 1);
+    }
+
   discrim = d_number (di);
   if (discrim < 0)
     return 0;
+  if (num_underscores > 1 && discrim >= 10)
+    {
+      if (d_peek_char (di) == '_')
+       d_advance (di, 1);
+      else
+       return 0;
+    }
+
   return 1;
 }