www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4220] New: I cannot apply safe to intrinsic operation(eg: std.math.sqrt)

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4220

           Summary: I cannot apply  safe to intrinsic operation(eg:
                    std.math.sqrt)
           Product: D
           Version: 2.041
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: zan77137 nifty.com


--- Comment #0 from SHOO <zan77137 nifty.com> 2010-05-22 19:27:36 PDT ---
I try to apply  safe/ trusted/ system to Phobos
See also http://lists.puremagic.com/pipermail/phobos/2010-May/000488.html
I found this issue there.

This issue causes mangling that had been influenced by  safe/ trusted.
dmd converts a specific symbol into intrinsic operation. However, dmd cannot
convert symbols that are marked by  safe/ trusted.
I am skeptical about the influence on mangling rule by  safe.
It may be related to overload, but I think that overload is unnecessary.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 22 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4220


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


--- Comment #1 from Walter Bright <bugzilla digitalmars.com> 2010-05-23
21:23:26 PDT ---
changeset 499
(also requires new std.math)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 23 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4220



--- Comment #2 from Walter Bright <bugzilla digitalmars.com> 2010-05-23
21:26:31 PDT ---
Requires the following changes to std.math:

317c317
< pure nothrow real cos(real x);       /* intrinsic */
---
  safe pure nothrow real cos(real x);       /* intrinsic */
332c332 < pure nothrow real sin(real x); /* intrinsic */ ---
  safe pure nothrow real sin(real x);       /* intrinsic */
397c397 < pure nothrow real tan(real x) ---
  trusted pure nothrow real tan(real x)
808c808 < pure nothrow long rndtol(real x); /* intrinsic */ ---
  safe pure nothrow long rndtol(real x);    /* intrinsic */
830c830 < pure nothrow ---
  safe pure nothrow
1388c1388 < pure nothrow real ldexp(real n, int exp); /* intrinsic */ ---
  safe pure nothrow real ldexp(real n, int exp);    /* intrinsic */
1582c1582 < pure nothrow real fabs(real x); /* intrinsic */ ---
  safe pure nothrow real fabs(real x);      /* intrinsic */
1781c1781 < pure nothrow real rint(real x); /* intrinsic */ ---
  safe pure nothrow real rint(real x);      /* intrinsic */
3610,3611c3610,3611 < pure nothrow real yl2x(real x, real y); // y * log2(x) < pure nothrow real yl2xp1(real x, real y); // y * log2(x + 1) ---
  safe pure nothrow real yl2x(real x, real y);         // y * log2(x)
  safe pure nothrow real yl2xp1(real x, real y);       // y * log2(x + 1)
-- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 23 2010