digitalmars.D.bugs - [Issue 8496] New: (Regression 2.060) Assignment of function literal to function pointer variable with non-D linkage broken
- d-bugmail puremagic.com (30/30) Aug 02 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8496
- d-bugmail puremagic.com (21/21) Sep 22 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8496
- d-bugmail puremagic.com (13/13) Sep 22 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8496
- d-bugmail puremagic.com (10/10) Sep 22 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8496
- d-bugmail puremagic.com (14/14) Oct 28 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8496
http://d.puremagic.com/issues/show_bug.cgi?id=8496 Summary: (Regression 2.060) Assignment of function literal to function pointer variable with non-D linkage broken Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: alex lycus.org --- Comment #0 from Alex Rønne Petersen <alex lycus.org> 2012-08-02 22:00:58 CEST --- This used to work in 2.059. alexrp alexrp ~/Projects/tests $ dmd test.d test.d(8): Error: cannot implicitly convert expression (__lambda1) of type void function() pure nothrow safe to extern (C) void function() alexrp alexrp ~/Projects/tests $ cat test.d alias extern (C) void function() Func; void main() { Func f; f = () { }; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 02 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8496 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|(Regression 2.060) |Assignment of function |Assignment of function |literal to function pointer |literal to function pointer |variable with non-D linkage |variable with non-D linkage |broken |broken | Severity|regression |enhancement --- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2012-09-22 03:23:45 PDT --- This is not a regression. In 2.059, this was accidentally allowed by the cause same with bug 8397. It's already fixed in 2.060. (Therefore, the call of function pointer f might had been broken in 2.059) And, lambda type inference does not infer function linkage in current implementation. Then, (){} is always extern(D), and the error is expected. But, it is reasonable feature. So I change the importance to 'enhancement'. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 22 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8496 --- Comment #2 from Kenji Hara <k.hara.pg gmail.com> 2012-09-22 03:26:34 PDT --- I'd like to update sample code. alias extern (C) void function() FP; void main() { FP fp = (){}; fp = (){}; } The fp declaration and assignment should infer the lambda's linkage. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 22 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8496 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #3 from Kenji Hara <k.hara.pg gmail.com> 2012-09-22 11:23:46 PDT --- https://github.com/D-Programming-Language/dmd/pull/1135 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 22 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8496 yebblies <yebblies gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |yebblies gmail.com Resolution| |FIXED AssignedTo|nobody puremagic.com |k.hara.pg gmail.com --- Comment #4 from yebblies <yebblies gmail.com> 2012-10-28 20:14:03 EST --- Fixed D2 https://github.com/D-Programming-Language/dmd/commit/a01abef9aafde2b0f155d55af6f1badbfece8920 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 28 2012