[Issue 6497] New: [safeD] Escaping a reference to a local variable from safe function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Aug 14 13:16:29 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6497
Summary: [safeD] Escaping a reference to a local variable from
safe function
Product: D
Version: D2
Platform: Other
OS/Version: Linux
Status: NEW
Keywords: accepts-invalid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: timon.gehr at gmx.ch
--- Comment #0 from timon.gehr at gmx.ch 2011-08-14 13:16:28 PDT ---
int* foo()@safe{
int n;
int*x=&(0?n:n);
return x;
}
This currently compiles without error.
(When fixing, make sure that safe functions can still assign to a
ConditionalExpression, afaik it is currently implemented by taking the address
of the 2. and 3. operands.)
--
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