Why is mangling different for separate compilation?

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sat Feb 27 03:25:54 PST 2016


On 2/27/2016 1:11 AM, Atila Neves wrote:
> On Saturday, 27 February 2016 at 03:51:00 UTC, Walter Bright wrote:
>> On 2/26/2016 4:45 AM, Atila Neves wrote:
>>> '_D3bar16__unittestL2_531FZv'
>>> '_D3bar14__unittestL2_1FZv'
>>
>> It uses a sequence number to generate different ids for the unit tests. In the
>> former, it's the 531st unit test, the latter, the first.
>
> In both cases though, there's only one unit test. The only difference is how the
> files were compiled.

It's a global number in the compiler.


> What's the number after "bar" then? It's 16 in one case and 14 in the other.

"31" adds 2 characters to the identifier



More information about the Digitalmars-d mailing list