Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
August 02, 2012 [Issue 8496] New: (Regression 2.060) Assignment of function literal to function pointer variable with non-D linkage broken | ||||
---|---|---|---|---|
| ||||
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: ------- |
September 22, 2012 [Issue 8496] Assignment of function literal to function pointer variable with non-D linkage broken | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alex Rønne Petersen | 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: ------- |
September 22, 2012 [Issue 8496] Assignment of function literal to function pointer variable with non-D linkage broken | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alex Rønne Petersen | 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: ------- |
September 22, 2012 [Issue 8496] Assignment of function literal to function pointer variable with non-D linkage broken | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alex Rønne Petersen | 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: ------- |
October 28, 2012 [Issue 8496] Assignment of function literal to function pointer variable with non-D linkage broken | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alex Rønne Petersen | 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: ------- |
Copyright © 1999-2021 by the D Language Foundation