May 13, 2011 [Issue 3797] Implicit conversion between incompatible function pointers | ||||
---|---|---|---|---|
| ||||
Posted in reply to yebblies | http://d.puremagic.com/issues/show_bug.cgi?id=3797 yebblies <yebblies@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |samukha@voliacable.com --- Comment #9 from yebblies <yebblies@gmail.com> 2011-05-13 06:00:57 PDT --- *** Issue 5994 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
May 13, 2011 [Issue 3797] Implicit conversion between incompatible function pointers | ||||
---|---|---|---|---|
| ||||
Posted in reply to yebblies | http://d.puremagic.com/issues/show_bug.cgi?id=3797 yebblies <yebblies@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code Severity|critical |regression --- Comment #10 from yebblies <yebblies@gmail.com> 2011-05-13 06:08:31 PDT --- (In reply to comment #9) > *** Issue 5994 has been marked as a duplicate of this issue. *** According to Don in beta mailing list: > Regression was introduced in 2.038. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
May 14, 2011 [Issue 3797] Regression(2.038): Implicit conversion between incompatible function pointers | ||||
---|---|---|---|---|
| ||||
Posted in reply to yebblies | http://d.puremagic.com/issues/show_bug.cgi?id=3797 timon.gehr@gmx.ch changed: What |Removed |Added ---------------------------------------------------------------------------- Version|2.040 |D2 --- Comment #11 from timon.gehr@gmx.ch 2011-05-14 08:12:54 PDT --- (In reply to comment #8) > *** Issue 5827 has been marked as a duplicate of this issue. *** Well, not exactly. But I guess it can be fixed together. My bug report was about function pointers with _different return types_ converting to each other: Timon Gehr wrote: > The following invalid D code is accepted by DMD: > > import std.stdio; > > int a=0; > ref int g(){ > writeln("called g"); > return ++a; > } > > void main(){ > int function() f=&g; //this should issue an error! > writeln(cast(int)&a); > writeln(f()); > } > > Output: > -144939256 > called g > -144939256 > > (&g is implicitly cast to "int function() ref", after that, the identical > calling conventions for "ref int" (int*) and int result in an implicit > reinterpret-cast from "ref int" to int.) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 05, 2011 [Issue 3797] Regression(2.038): Implicit conversion between incompatible function pointers | ||||
---|---|---|---|---|
| ||||
Posted in reply to yebblies | http://d.puremagic.com/issues/show_bug.cgi?id=3797 yebblies <yebblies@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jsancio@gmail.com --- Comment #12 from yebblies <yebblies@gmail.com> 2011-06-04 22:52:55 PDT --- *** Issue 5821 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 07, 2011 [Issue 3797] Regression(2.038): Implicit conversion between incompatible function pointers | ||||
---|---|---|---|---|
| ||||
Posted in reply to yebblies | http://d.puremagic.com/issues/show_bug.cgi?id=3797 --- Comment #13 from yebblies <yebblies@gmail.com> 2011-06-06 19:33:41 PDT --- *** Issue 4891 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 07, 2011 [Issue 3797] Regression(2.038): Implicit conversion between incompatible function pointers | ||||
---|---|---|---|---|
| ||||
Posted in reply to yebblies | http://d.puremagic.com/issues/show_bug.cgi?id=3797 yebblies <yebblies@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eatingstaples@gmail.com --- Comment #14 from yebblies <yebblies@gmail.com> 2011-06-06 19:39:53 PDT --- *** Issue 5434 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 07, 2011 [Issue 3797] Regression(2.038): Implicit conversion between incompatible function pointers | ||||
---|---|---|---|---|
| ||||
Posted in reply to yebblies | http://d.puremagic.com/issues/show_bug.cgi?id=3797 --- Comment #15 from yebblies <yebblies@gmail.com> 2011-06-06 20:01:10 PDT --- The reason this happens is because TypeFunction does not override constConv. When called on TypeFunction, TypeNext::constConv is actually called, which only compares the return type. (next in TypeFunction is the return type) I've created a possible fix in dmd pull 88 which defines TypeFunction::constConv to disallow most implicit conversions between function pointers. The current patch allows reasonable purity, safety and nothrow conversions. If you're interested, please take a look and see if all cases are covered. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 07, 2011 [Issue 3797] Regression(2.038): Implicit conversion between incompatible function pointers | ||||
---|---|---|---|---|
| ||||
Posted in reply to yebblies | http://d.puremagic.com/issues/show_bug.cgi?id=3797 klickverbot <code@klickverbot.at> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch CC| |code@klickverbot.at --- Comment #16 from klickverbot <code@klickverbot.at> 2011-06-07 00:32:09 PDT --- Against all odds, I independently started to work on a fix yesterday: https://github.com/D-Programming-Language/dmd/pull/91. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 08, 2011 [Issue 3797] Regression(2.038): Implicit conversion between incompatible function pointers | ||||
---|---|---|---|---|
| ||||
Posted in reply to yebblies | http://d.puremagic.com/issues/show_bug.cgi?id=3797 yebblies <yebblies@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mrmocool@gmx.de --- Comment #17 from yebblies <yebblies@gmail.com> 2011-06-08 00:48:14 PDT --- *** Issue 5167 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 09, 2011 [Issue 3797] Regression(2.038): Implicit conversion between incompatible function pointers | ||||
---|---|---|---|---|
| ||||
Posted in reply to yebblies | http://d.puremagic.com/issues/show_bug.cgi?id=3797 --- Comment #18 from yebblies <yebblies@gmail.com> 2011-06-08 22:27:18 PDT --- https://github.com/D-Programming-Language/dmd/pull/96 -- 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