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.

        Jakub

Reply via email to