This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH C++] Fix PR77489 -- mangling of discriminator >= 10
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Markus Trippelsdorf <markus at trippelsdorf dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Jason Merrill <jason at redhat dot com>
- Date: Wed, 11 Jan 2017 13:03:30 +0100
- Subject: Re: [PATCH C++] Fix PR77489 -- mangling of discriminator >= 10
- Authentication-results: sourceware.org; auth=none
- References: <20170111114829.GA288@x4>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Jan 11, 2017 at 12:48:29PM +0100, Markus Trippelsdorf wrote:
> @@ -1965,7 +1966,11 @@ write_discriminator (const int discriminator)
> if (discriminator > 0)
> {
> write_char ('_');
> + if (abi_version_at_least(11) && discriminator - 1 >= 10)
> + write_char ('_');
> write_unsigned_number (discriminator - 1);
> + if (abi_version_at_least(11) && discriminator - 1 >= 10)
> + write_char ('_');
Formatting nits, there should be space before (11).
> +// { dg-final { scan-assembler "_ZZ3foovE8localVar__10_" } }
> +// { dg-final { scan-assembler "_ZZ3foovE8localVar__11_" } }
Would be nice to also
// { dg-final { scan-assembler "_ZZ3foovE8localVar_9" } }
Otherwise, I defer to Jason (primarily whether this doesn't need
ABI version 12).
Jakub