From: Markus Trippelsdorf Date: Wed, 18 Jan 2017 15:49:15 +0000 (+0000) Subject: PR c++/77489 -- Reorganize abi warning check X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0c6299bbfd50c064913bbc0e1d810848f66d8994;p=gcc.git PR c++/77489 -- Reorganize abi warning check PR c++/77489 * mangle.c (write_discriminator): Reorganize abi warning check. From-SVN: r244580 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 32bf9e36070..7e8c465aba9 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2017-01-18 Markus Trippelsdorf + + PR c++/77489 + * mangle.c (write_discriminator): Reorganize abi warning check. + 2017-01-18 Nathan Sidwell * cp-tree.h: Clarify exception spec node comment. diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index 033660f0091..38b6a635704 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -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)