[Issue 8185] Pure functions and pointers
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jun 4 11:49:16 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8185
--- Comment #52 from Steven Schveighoffer <schveiguy at yahoo.com> 2012-06-04 11:51:14 PDT ---
(In reply to comment #49)
> It seems that the compiler will only optimize based on "pureness" if a function
> takes an 'immutable T*' argument, even 'immutable(T)*' is enough to turn the
> optimization off.
This is a bug, both should be optimized equally:
void foo(immutable int * _param) pure
{
immutable(int)* param = _param; // legal
... // same code as if you had written void foo(immutable(int)* param)
}
--
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