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 18, 2017 at 10:32 AM, Markus Trippelsdorf
<markus@trippelsdorf.de> wrote:
> On 2017.01.18 at 16:25 +0100, Jakub Jelinek wrote:
>> On Wed, Jan 18, 2017 at 04:16:44PM +0100, Markus Trippelsdorf wrote:
>> > No. It appears to work even without the additional condition:
>> >
>> >  % g++ -fabi-version=10 -Wabi=11 -Wall -c gcc/testsuite/g++.dg/abi/pr77489.C
>> > gcc/testsuite/g++.dg/abi/pr77489.C:56:16: warning: the mangled name of ‘localVar’ changes between -fabi-version=10 (_ZZ3foovE8localVar_11) and -fabi-version=11 (_ZZ3foovE8localVar__11_) [-Wabi]
>> >      static int localVar = 12;
>> >                 ^~~~~~~~
>> > gcc/testsuite/g++.dg/abi/pr77489.C:52:16: warning: the mangled name of ‘localVar’ changes between -fabi-version=10 (_ZZ3foovE8localVar_10) and -fabi-version=11 (_ZZ3foovE8localVar__10_) [-Wabi]
>> >      static int localVar = 11;
>> >                 ^~~~~~~~
>>
>> But it is less efficient then for the the one digit discriminators.
>> When we set G.need_abi_warning unnecessarily, then mangle_decl has to
>> mangle it again with different ABI flags and compare the two mangled
>> identifiers.  If G.need_abi_warning is not set, we avoid that.
>
> Ok, fair enough.
>
>         PR c++/77489
>         * mangle.c (write_discriminator): Reorganize abi warning check.

OK, thanks.

Jason


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