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

Jason Merrill jason@redhat.com
Tue Jan 17 18:40:00 GMT 2017


On Thu, Jan 12, 2017 at 2:36 AM, Markus Trippelsdorf
<markus@trippelsdorf.de> wrote:
> On 2017.01.11 at 13:03 +0100, Jakub Jelinek wrote:
>> 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).
>
> Thanks for review. I will fix these issues.
> Jason said on IRC that he is fine with ABI version 11.
>
> Ok for trunk?

This also needs the same (invoke.texi and warning) changes that Nathan
pointed out on your other mangling patch.

Jason



More information about the Gcc-patches mailing list