Summary: variables with static/private storage create global
           Product: D
           Version: D2
          Platform: Other
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2011-12-08 17:28:27 PST ---
module bug;

    __gshared int sa;
    extern(C) __gshared int sb;

    __gshared int pa;
    extern(C) __gshared int pb;

dmd -c bug.d
nm -c bug.o

0000000000000008 B _D3bug2pai
0000000000000000 B _D3bug2sai
000000000000000c B pb
0000000000000004 B sb

expected output:
0000000000000008 b _D3bug2pai
0000000000000000 b _D3bug2sai
000000000000000c b pb
0000000000000004 b sb

Either static or private should provide the C's static semantic
of defining a local symbol, i.e. one that can only be accessed
from within the same object file. Probably only useful for
extern(C) as D declarations are scoped by the mangling but
for D it would still shrink the symbol table.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to