PR c++/77489 -- Reorganize abi warning check

PR c++/77489
	* mangle.c (write_discriminator): Reorganize abi warning check.

From-SVN: r244580
This commit is contained in:
Markus Trippelsdorf 2017-01-18 15:49:15 +00:00 committed by Markus Trippelsdorf
parent 8465132c9b
commit 0c6299bbfd
2 changed files with 8 additions and 2 deletions

View 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.

View 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)