[Issue 5529] New: std.system.endian for pure functions?

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Feb 5 06:11:59 PST 2011


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

           Summary: std.system.endian for pure functions?
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2011-02-05 06:09:40 PST ---
This little D2 program:


import std.system: endian;
pure void main() {
    auto e = endian;
}


DMD 2.051 shows the errors:
test.d(3): Error: pure function 'main' cannot access mutable static data
'endian'
test.d(3): Error: pure function 'main' cannot access mutable static data
'endian'

Like __ctfe, I'd like to use std.system.endian in pure functions too.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list