www.digitalmars.com         C & C++   DMDScript  

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

reply d-bugmail puremagic.com writes:
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 digitalmars.com
        ReportedBy: thecybershadow 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.


-- 
Jan 07 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=817






Also, I can't spell. (eleven*)


-- 
Jan 07 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=817


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed DMD 1.001


-- 
Jan 27 2007