[Issue 817] New: const char[] = string_literal - string_literal gets included for every reference

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jan 7 18:40:18 PST 2007


http://d.puremagic.com/issues/show_bug.cgi?id=817

           Summary: const char[] = string_literal - string_literal gets
                    included for every reference
           Product: D
           Version: 1.00
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: minor
          Priority: P4
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: thecybershadow at gmail.com


Program:

import std.stdio;

const char[] str = "Hello!";

void main()
{
    writefln(str);
    writefln(str);
    writefln(str);
    writefln(str);
    writefln(str);
    writefln(str);
    writefln(str);
    writefln(str);
    writefln(str);
    writefln(str);
}

The compiled file contains the string "Hello!" 11 (evelen) times.

Doesn't happen with GDC.


-- 



More information about the Digitalmars-d-bugs mailing list