PR c++/77489 -- Reorganize abi warning check
authorMarkus Trippelsdorf <markus@trippelsdorf.de>
Wed, 18 Jan 2017 15:49:15 +0000 (15:49 +0000)
committerMarkus Trippelsdorf <trippels@gcc.gnu.org>
Wed, 18 Jan 2017 15:49:15 +0000 (15:49 +0000)
PR c++/77489
* mangle.c (write_discriminator): Reorganize abi warning check.

From-SVN: r244580

gcc/cp/ChangeLog
gcc/cp/mangle.c

index 32bf9e36070f5d284eb3260d012c6d258822ceaa..7e8c465aba9a044610d6afecf997b55efadebbc1 100644 (file)
@@ -1,3 +1,8 @@
+2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
+
+       PR c++/77489
+       * mangle.c (write_discriminator): Reorganize abi warning check.
+
 2017-01-18  Nathan Sidwell  <nathan@acm.org>
 
        * cp-tree.h: Clarify exception spec node comment.
index 033660f00917e938a91c423382bbaad9c5ebd0a1..38b6a6357044af4c7308dd7c4fef4ba1006fdffa 100644 (file)
@@ -1964,11 +1964,12 @@ write_discriminator (const int discriminator)
   if (discriminator > 0)
     {
       write_char ('_');
-      if (abi_version_at_least (11) && discriminator - 1 >= 10)
+      if (discriminator - 1 >= 10)
        {
-         write_char ('_');
          if (abi_warn_or_compat_version_crosses (11))
            G.need_abi_warning = 1;
+         if (abi_version_at_least (11))
+           write_char ('_');
        }
       write_unsigned_number (discriminator - 1);
       if (abi_version_at_least (11) && discriminator - 1 >= 10)