digitalmars.D.bugs - [Issue 11131] New: variables without linkage shouldn't have a mangling (.mangleof)
- d-bugmail puremagic.com (37/37) Sep 27 2013 http://d.puremagic.com/issues/show_bug.cgi?id=11131
http://d.puremagic.com/issues/show_bug.cgi?id=11131 Summary: variables without linkage shouldn't have a mangling (.mangleof) Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: code dawg.eu cat > bug.d << CODE void foo() { uint var1 = 1; // stack: no linkage => no mangling pragma(msg, var1.mangleof); // prints '_D3bug3fooFZv4var1k' enum uint var2 = 2; // manifest: no linkage => no mangling pragma(msg, var2.mangleof); // prints 'k' // TLS variables are debatable static uint var3 = 3; // TLS: no linkage => no mangling pragma(msg, var3.mangleof); // prints '_D3bug3fooFZv4var3k' (mangling of the initializer) auto var4 = new uint; // heap: no linkage => no mangling pragma(msg, var4.mangleof); // prints '_D3bug3fooFZv4var4Pk' } CODE dmd -c bug ---- The .mangleof property solely looks on the type but doesn't take the storage class into account. Not sure whether these should return an empty string or cause an error. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 27 2013