digitalmars.D.bugs - [Issue 12226] New: functions can return local stack-allocated objects by reference
- d-bugmail puremagic.com (21/21) Feb 22 2014 https://d.puremagic.com/issues/show_bug.cgi?id=12226
https://d.puremagic.com/issues/show_bug.cgi?id=12226 Summary: functions can return local stack-allocated objects by reference Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: accepts-invalid, diagnostic Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: andrea.9940 gmail.com An auto ref function can return a local stack-allocated struct by reference causing undefined behavior when executed. Sample code: http://pastebin.com/rvcNdjAE -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 22 2014