This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH C++] Fix PR77489 -- mangling of discriminator >= 10


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]